Skip to content

Fix status field decode issue on Reponse object received from the AirVantage server#3

Open
fdur wants to merge 3 commits intomainfrom
basic_client_example_2_ticket_ID_issue
Open

Fix status field decode issue on Reponse object received from the AirVantage server#3
fdur wants to merge 3 commits intomainfrom
basic_client_example_2_ticket_ID_issue

Conversation

@fdur
Copy link

@fdur fdur commented Mar 25, 2026

When a Response object is received by the client, consider the Status field like a number

@fdur
Copy link
Author

fdur commented Mar 25, 2026

Test:

Connected to M3DA server

--- Example 2: Sending message with response ---
DEBUG  [09:23:31.435] Waiting for response 
✅ Command sent successfully, received 1 responses
Response 0: *m3da.M3daResponse
  Status: 0, Message: , TicketID: 1234
  ✅ Found matching response for ticket ID 1234
✅ Example 2 passed

✅ All examples completed successfully!

@fdur fdur requested a review from bplessis-swi March 25, 2026 19:24
@fdur
Copy link
Author

fdur commented Mar 25, 2026

@bplessis-swi
Are you sure that this is correct ?
Unit test TestBysantRoundTrip_Comprehensive:

		{
			name: "Response",
			input: &M3daResponse{
				TicketID: 12345,
				Status:   200,
				Message:  "OK",
			},
			expectedBytes: []byte{0x62, 0xe7, 0x0f, 0xad, 0xe0, 0x87, 0x05, 0x4f, 0x4b},
			context:       ContextGlobal,
		},

According to the M3DA specification, if the response status is 200 it means that an error occured.
The value to indicate a successful status is 0 and in this case, the Message field should be null

@fdur fdur linked an issue Mar 25, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Basic client: error on example 2 when connected to AirVantage

1 participant