sbgEComCmdOutput.c
Go to the documentation of this file.
1 #include "sbgEComCmdOutput.h"
3 
4 //----------------------------------------------------------------------//
5 //- Output commands -//
6 //----------------------------------------------------------------------//
7 
18 {
19  SbgErrorCode errorCode = SBG_NO_ERROR;
20  uint32 trial;
21  size_t receivedSize;
22  uint8 receivedBuffer[SBG_ECOM_MAX_BUFFER_SIZE];
23  SbgStreamBuffer inputStream;
24  uint8 outputBuffer[SBG_ECOM_MAX_BUFFER_SIZE];
25  SbgStreamBuffer outputStream;
26 
27  //
28  // Test that the input pointer are valid
29  //
30  if ((pHandle) && (pConf))
31  {
32  //
33  // Send the command three times
34  //
35  for (trial = 0; trial < pHandle->numTrials; trial++)
36  {
37 
38  //
39  // Initialize output stream buffer
40  //
41  sbgStreamBufferInitForWrite(&outputStream, &outputBuffer, sizeof(outputBuffer));
42 
43  //
44  // Build payload
45  //
46  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)outputPort);
47  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)msgId);
48  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)classId);
49 
50  //
51  // Send the command and the prepared payload
52  //
54 
55  //
56  // Make sure that the command has been sent
57  //
58  if (errorCode == SBG_NO_ERROR)
59  {
60  //
61  // Try to read the device answer for 500 ms
62  //
63  errorCode = sbgEComReceiveCmd(pHandle, SBG_ECOM_CLASS_LOG_CMD_0, SBG_ECOM_CMD_OUTPUT_CONF, receivedBuffer, &receivedSize, sizeof(receivedBuffer), pHandle->cmdDefaultTimeOut);
64 
65  //
66  // Test if we have received a SBG_ECOM_CMD_OUTPUT_CONF command
67  //
68  if (errorCode == SBG_NO_ERROR)
69  {
70  //
71  // Initialize stream buffer to read parameters
72  //
73  sbgStreamBufferInitForRead(&inputStream, receivedBuffer, receivedSize);
74 
75  //
76  // Read parameters
77  // First is returned outputPort, then messageId, classId rate and the output configuration at last.
78  //
79  outputPort = (SbgEComOutputPort)sbgStreamBufferReadUint8LE(&inputStream);
80  msgId = sbgStreamBufferReadUint8LE(&inputStream);
81  classId = (SbgEComClass)sbgStreamBufferReadUint8LE(&inputStream);
82  *pConf = (SbgEComOutputMode)sbgStreamBufferReadUint16LE(&inputStream);
83 
84  //
85  // The command has been executed successfully so return
86  //
87  break;
88  }
89  }
90  else
91  {
92  //
93  // We have a write error so exit the try loop
94  //
95  break;
96  }
97  }
98  }
99  else
100  {
101  //
102  // Null pointer.
103  //
104  errorCode = SBG_NULL_POINTER;
105  }
106 
107  return errorCode;
108 }
109 
120 {
121  SbgErrorCode errorCode = SBG_NO_ERROR;
122  uint32 trial;
123  uint8 outputBuffer[SBG_ECOM_MAX_BUFFER_SIZE];
124  SbgStreamBuffer outputStream;
125 
126  //
127  // Test that the input pointer are valid
128  //
129  if (pHandle)
130  {
131  //
132  // Send the command three times
133  //
134  for (trial = 0; trial < pHandle->numTrials; trial++)
135  {
136  //
137  // Init stream buffer for output
138  //
139  sbgStreamBufferInitForWrite(&outputStream, outputBuffer, sizeof(outputBuffer));
140 
141  //
142  // Build payload
143  //
144  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)outputPort);
145  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)msgId);
146  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)classId);
147  sbgStreamBufferWriteUint16LE(&outputStream, (uint16)conf);
148 
149  //
150  // Send the payload over ECom
151  //
153 
154  //
155  // Make sure that the command has been sent
156  //
157  if (errorCode == SBG_NO_ERROR)
158  {
159  //
160  // Try to read the device answer for 500 ms
161  //
163 
164  //
165  // Test if we have received a valid ACK
166  //
167  if (errorCode == SBG_NO_ERROR)
168  {
169  //
170  // The command has been executed successfully so return
171  //
172  break;
173  }
174  }
175  else
176  {
177  //
178  // We have a write error so exit the try loop
179  //
180  break;
181  }
182  }
183  }
184  else
185  {
186  //
187  // Invalid protocol handle.
188  //
189  errorCode = SBG_NULL_POINTER;
190  }
191 
192  return errorCode;
193 }
194 
204 {
205  SbgErrorCode errorCode = SBG_NO_ERROR;
206  uint32 trial;
207  size_t receivedSize;
208  uint8 receivedBuffer[SBG_ECOM_MAX_BUFFER_SIZE];
209  SbgStreamBuffer inputStream;
210  uint8 outputBuffer[SBG_ECOM_MAX_BUFFER_SIZE];
211  SbgStreamBuffer outputStream;
212 
213  //
214  // Test that the input pointer are valid
215  //
216  if ((pHandle) && (pEnable))
217  {
218  //
219  // Send the command three times
220  //
221  for (trial = 0; trial < pHandle->numTrials; trial++)
222  {
223 
224  //
225  // Initialize output stream buffer
226  //
227  sbgStreamBufferInitForWrite(&outputStream, &outputBuffer, sizeof(outputBuffer));
228 
229  //
230  // Build payload
231  //
232  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)outputPort);
233  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)classId);
234 
235  //
236  // Send the command and the prepared payload
237  //
239 
240  //
241  // Make sure that the command has been sent
242  //
243  if (errorCode == SBG_NO_ERROR)
244  {
245  //
246  // Try to read the device answer for 500 ms
247  //
248  errorCode = sbgEComReceiveCmd(pHandle, SBG_ECOM_CLASS_LOG_CMD_0, SBG_ECOM_CMD_OUTPUT_CLASS_ENABLE, receivedBuffer, &receivedSize, sizeof(receivedBuffer), pHandle->cmdDefaultTimeOut);
249 
250  //
251  // Test if we have received a correct answer
252  //
253  if (errorCode == SBG_NO_ERROR)
254  {
255  //
256  // Initialize stream buffer to read parameters
257  //
258  sbgStreamBufferInitForRead(&inputStream, receivedBuffer, receivedSize);
259 
260  //
261  // Read parameters
262  // First is returned outputPort, then messageId, classId rate and the output configuration at last.
263  //
264  outputPort = (SbgEComOutputPort)sbgStreamBufferReadUint8LE(&inputStream);
265  classId = (SbgEComClass)sbgStreamBufferReadUint8LE(&inputStream);
266  *pEnable = (bool)sbgStreamBufferReadUint8LE(&inputStream);
267 
268  //
269  // The command has been executed successfully so return
270  //
271  break;
272  }
273  }
274  else
275  {
276  //
277  // We have a write error so exit the try loop
278  //
279  break;
280  }
281  }
282  }
283  else
284  {
285  //
286  // Null pointer.
287  //
288  errorCode = SBG_NULL_POINTER;
289  }
290 
291  return errorCode;
292 }
293 
303 {
304  SbgErrorCode errorCode = SBG_NO_ERROR;
305  uint32 trial;
306  uint8 outputBuffer[SBG_ECOM_MAX_BUFFER_SIZE];
307  SbgStreamBuffer outputStream;
308 
309  //
310  // Test that the input pointer are valid
311  //
312  if (pHandle)
313  {
314  //
315  // Send the command three times
316  //
317  for (trial = 0; trial < pHandle->numTrials; trial++)
318  {
319  //
320  // Init stream buffer for output
321  //
322  sbgStreamBufferInitForWrite(&outputStream, outputBuffer, sizeof(outputBuffer));
323 
324  //
325  // Build payload
326  //
327  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)outputPort);
328  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)classId);
329  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)enable);
330 
331  //
332  // Send the payload over ECom
333  //
335 
336  //
337  // Make sure that the command has been sent
338  //
339  if (errorCode == SBG_NO_ERROR)
340  {
341  //
342  // Try to read the device answer for 500 ms
343  //
345 
346  //
347  // Test if we have received a valid ACK
348  //
349  if (errorCode == SBG_NO_ERROR)
350  {
351  //
352  // The command has been executed successfully so return
353  //
354  break;
355  }
356  }
357  else
358  {
359  //
360  // We have a write error so exit the try loop
361  //
362  break;
363  }
364  }
365  }
366  else
367  {
368  //
369  // Invalid protocol handle.
370  //
371  errorCode = SBG_NULL_POINTER;
372  }
373 
374  return errorCode;
375 }
376 
386 SbgErrorCode sbgEComCmdCanOutputGetConf(SbgEComHandle *pHandle, SbgECanMessageId internalId, SbgEComOutputMode *pMode, uint32 *pUserId, bool *pExtended)
387 {
388  SbgErrorCode errorCode = SBG_NO_ERROR;
389  uint32 trial;
390  size_t receivedSize;
391  uint8 receivedBuffer[SBG_ECOM_MAX_BUFFER_SIZE];
392  uint8 outputBuffer[2];
393  SbgStreamBuffer outputStream;
394  SbgStreamBuffer inputStream;
395 
396  //
397  // Test that the input pointer are valid
398  //
399  if ((pHandle) && (pUserId) && (pExtended) && (pMode) )
400  {
401  //
402  // Send the command three times
403  //
404  for (trial = 0; trial < pHandle->numTrials; trial++)
405  {
406  //
407  // Send the command and a 2-byte payload
408  //
409  sbgStreamBufferInitForWrite(&outputStream, outputBuffer, sizeof(outputBuffer));
410  sbgStreamBufferWriteUint16LE(&outputStream, internalId);
412 
413  //
414  // Make sure that the command has been sent
415  //
416  if (errorCode == SBG_NO_ERROR)
417  {
418  //
419  // Try to read the device answer for 500 ms
420  //
421  errorCode = sbgEComReceiveCmd(pHandle, SBG_ECOM_CLASS_LOG_CMD_0, SBG_ECOM_CMD_CAN_OUTPUT_CONF, receivedBuffer, &receivedSize, sizeof(receivedBuffer), pHandle->cmdDefaultTimeOut);
422 
423  //
424  // Test if we have received a correct answer
425  //
426  if (errorCode == SBG_NO_ERROR)
427  {
428  //
429  // Initialize stream buffer to read parameters
430  //
431  sbgStreamBufferInitForRead(&inputStream, receivedBuffer, receivedSize);
432 
433  //
434  // Read parameters
435  // First is returned outputPort, then messageId, classId rate and the output configuration at last.
436  //
437  internalId = (SbgECanMessageId)sbgStreamBufferReadUint16LE(&inputStream);
438  *pMode = (SbgEComOutputMode)sbgStreamBufferReadUint16LE(&inputStream);
439  *pUserId = sbgStreamBufferReadUint32LE(&inputStream);
440  *pExtended = (bool)sbgStreamBufferReadUint8LE(&inputStream);
441 
442  //
443  // The command has been executed successfully so return
444  //
445  break;
446  }
447  }
448  else
449  {
450  //
451  // We have a write error so exit the try loop
452  //
453  break;
454  }
455  }
456  }
457  else
458  {
459  //
460  // Null pointer.
461  //
462  errorCode = SBG_NULL_POINTER;
463  }
464 
465  return errorCode;
466 }
467 
478 {
479  SbgErrorCode errorCode = SBG_NO_ERROR;
480  uint32 trial;
481  uint8 outputBuffer[SBG_ECOM_MAX_BUFFER_SIZE];
482  SbgStreamBuffer outputStream;
483 
484  //
485  // Test that the input pointer are valid
486  //
487  if (pHandle)
488  {
489  //
490  // Send the command three times
491  //
492  for (trial = 0; trial < pHandle->numTrials; trial++)
493  {
494  //
495  // Init stream buffer for output
496  //
497  sbgStreamBufferInitForWrite(&outputStream, outputBuffer, sizeof(outputBuffer));
498 
499  //
500  // Build payload
501  //
502  sbgStreamBufferWriteUint16LE(&outputStream, (uint16)internalId);
503  sbgStreamBufferWriteUint16LE(&outputStream, (uint16)mode);
504  sbgStreamBufferWriteUint32LE(&outputStream, userId);
505  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)extended);
506 
507  //
508  // Send the payload over ECom
509  //
511 
512  //
513  // Make sure that the command has been sent
514  //
515  if (errorCode == SBG_NO_ERROR)
516  {
517  //
518  // Try to read the device answer for 500 ms
519  //
521 
522  //
523  // Test if we have received a valid ACK
524  //
525  if (errorCode == SBG_NO_ERROR)
526  {
527  //
528  // The command has been executed successfully so return
529  //
530  break;
531  }
532  }
533  else
534  {
535  //
536  // We have a write error so exit the try loop
537  //
538  break;
539  }
540  }
541  }
542  else
543  {
544  //
545  // Invalid protocol handle.
546  //
547  errorCode = SBG_NULL_POINTER;
548  }
549 
550  return errorCode;
551 }
552 
561 {
562  SbgErrorCode errorCode = SBG_NO_ERROR;
563  uint32 trial;
564  size_t receivedSize;
565  uint8 receivedBuffer[SBG_ECOM_MAX_BUFFER_SIZE];
566  SbgStreamBuffer inputStream;
567  uint8 outputBuffer[1];
568  SbgStreamBuffer outputStream;
569 
570  //
571  // Test that the input pointer are valid
572  //
573  if ((pHandle) && (pConf))
574  {
575  //
576  // Send the command three times
577  //
578  for (trial = 0; trial < pHandle->numTrials; trial++)
579  {
580  //
581  // Initialize output stream buffer
582  //
583  sbgStreamBufferInitForWrite(&outputStream, &outputBuffer, sizeof(outputBuffer));
584 
585  //
586  // Build payload
587  //
588  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)outputPort);
589 
590  //
591  // Send the command and the prepared payload
592  //
594 
595  //
596  // Make sure that the command has been sent
597  //
598  if (errorCode == SBG_NO_ERROR)
599  {
600  //
601  // Try to read the device answer for 500 ms
602  //
603  errorCode = sbgEComReceiveCmd(pHandle, SBG_ECOM_CLASS_LOG_CMD_0, SBG_ECOM_CMD_LEGACY_CONT_OUTPUT_CONF, receivedBuffer, &receivedSize, sizeof(receivedBuffer), pHandle->cmdDefaultTimeOut);
604 
605  //
606  // Test if we have received a correct command
607  //
608  if (errorCode == SBG_NO_ERROR)
609  {
610  //
611  // Initialize stream buffer to read parameters
612  //
613  sbgStreamBufferInitForRead(&inputStream, receivedBuffer, receivedSize);
614 
615  //
616  // Read parameters
617  // First is returned outputPort, then messageId, classId rate and the output configuration at last.
618  //
619  outputPort = (SbgEComOutputPort)sbgStreamBufferReadUint8LE(&inputStream);
620  pConf->mask = sbgStreamBufferReadUint32LE(&inputStream);
621  pConf->format = (SbgEComLegacyFormat)sbgStreamBufferReadUint8LE(&inputStream);
622  pConf->endian = (SbgEComLegacyEndian)sbgStreamBufferReadUint8LE(&inputStream);
623  pConf->mode = (SbgEComOutputMode)sbgStreamBufferReadUint16LE(&inputStream);
624 
625  //
626  // The command has been executed successfully so return
627  //
628  break;
629  }
630  }
631  else
632  {
633  //
634  // We have a write error so exit the try loop
635  //
636  break;
637  }
638  }
639  }
640  else
641  {
642  //
643  // Null pointer.
644  //
645  errorCode = SBG_NULL_POINTER;
646  }
647 
648  return errorCode;
649 }
650 
659 {
660  SbgErrorCode errorCode = SBG_NO_ERROR;
661  uint32 trial;
662  uint8 outputBuffer[9];
663  SbgStreamBuffer outputStream;
664 
665  //
666  // Test that the input pointer are valid
667  //
668  if ((pHandle) && (pConf))
669  {
670  //
671  // Send the command three times
672  //
673  for (trial = 0; trial < pHandle->numTrials; trial++)
674  {
675  //
676  // Init stream buffer for output
677  //
678  sbgStreamBufferInitForWrite(&outputStream, outputBuffer, sizeof(outputBuffer));
679 
680  //
681  // Build payload
682  //
683  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)outputPort);
684  sbgStreamBufferWriteUint32LE(&outputStream, pConf->mask);
685  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)pConf->format);
686  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)pConf->endian);
687  sbgStreamBufferWriteUint16LE(&outputStream, (uint16)pConf->mode);
688 
689  //
690  // Send the payload over ECom
691  //
693 
694  //
695  // Make sure that the command has been sent
696  //
697  if (errorCode == SBG_NO_ERROR)
698  {
699  //
700  // Try to read the device answer for 500 ms
701  //
703 
704  //
705  // Test if we have received a valid ACK
706  //
707  if (errorCode == SBG_NO_ERROR)
708  {
709  //
710  // The command has been executed successfully so return
711  //
712  break;
713  }
714  }
715  else
716  {
717  //
718  // We have a write error so exit the try loop
719  //
720  break;
721  }
722  }
723  }
724  else
725  {
726  //
727  // Invalid protocol handle.
728  //
729  errorCode = SBG_NULL_POINTER;
730  }
731 
732  return errorCode;
733 }
734 
743 {
744  SbgErrorCode errorCode = SBG_NO_ERROR;
745  uint32 trial;
746  size_t receivedSize;
747  uint8 receivedBuffer[SBG_ECOM_MAX_BUFFER_SIZE];
748  SbgStreamBuffer inputStream;
749  uint8 outputBuffer[1];
750  SbgStreamBuffer outputStream;
751 
752  //
753  // Test that the input pointer are valid
754  //
755  if (pHandle)
756  {
757  //
758  // Send the command three times
759  //
760  for (trial = 0; trial < pHandle->numTrials; trial++)
761  {
762  //
763  // Send the command with the output port as a 1-byte payload
764  //
765  sbgStreamBufferInitForWrite(&outputStream, outputBuffer, sizeof(outputBuffer));
766  sbgStreamBufferWriteUint8(&outputStream, outputPort);
768 
769  //
770  // Make sure that the command has been sent
771  //
772  if (errorCode == SBG_NO_ERROR)
773  {
774  //
775  // Try to read the device answer for 500 ms
776  //
777  errorCode = sbgEComReceiveCmd(pHandle, SBG_ECOM_CLASS_LOG_CMD_0, SBG_ECOM_CMD_NMEA_TALKER_ID, receivedBuffer, &receivedSize, sizeof(receivedBuffer), pHandle->cmdDefaultTimeOut);
778 
779  //
780  // Test if we have received a SBG_ECOM_CMD_NMEA_TALKER_ID command
781  //
782  if (errorCode == SBG_NO_ERROR)
783  {
784  //
785  // Initialize stream buffer to read parameters
786  //
787  sbgStreamBufferInitForRead(&inputStream, receivedBuffer, receivedSize);
788 
789  //
790  // Read parameters
791  //
792  outputPort = (SbgEComOutputPort)sbgStreamBufferReadUint8LE(&inputStream);
793  nmeaTalkerId[0] = (char)sbgStreamBufferReadUint8LE(&inputStream);
794  nmeaTalkerId[1] = (char)sbgStreamBufferReadUint8LE(&inputStream);
795 
796  //
797  // The command has been executed successfully so return
798  //
799  break;
800  }
801  }
802  else
803  {
804  //
805  // We have a write error so exit the try loop
806  //
807  break;
808  }
809  }
810  }
811  else
812  {
813  //
814  // Null pointer.
815  //
816  errorCode = SBG_NULL_POINTER;
817  }
818 
819  return errorCode;
820 }
821 
829 SbgErrorCode sbgEComCmdOutputSetNmeaTalkerId(SbgEComHandle *pHandle, SbgEComOutputPort outputPort, const char nmeaTalkerId[2])
830 {
831  SbgErrorCode errorCode = SBG_NO_ERROR;
832  uint32 trial;
833  uint8 outputBuffer[3];
834  SbgStreamBuffer outputStream;
835 
836  //
837  // Test that the input pointer are valid
838  //
839  if (pHandle)
840  {
841  //
842  // Send the command three times
843  //
844  for (trial = 0; trial < pHandle->numTrials; trial++)
845  {
846  //
847  // Init stream buffer for output
848  //
849  sbgStreamBufferInitForWrite(&outputStream, outputBuffer, sizeof(outputBuffer));
850 
851  //
852  // Build payload
853  //
854  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)outputPort);
855  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)(nmeaTalkerId[0]));
856  sbgStreamBufferWriteUint8LE(&outputStream, (uint8)(nmeaTalkerId[1]));
857 
858  //
859  // Send the payload over ECom
860  //
862 
863  //
864  // Make sure that the command has been sent
865  //
866  if (errorCode == SBG_NO_ERROR)
867  {
868  //
869  // Try to read the device answer for 500 ms
870  //
872 
873  //
874  // Test if we have received a valid ACK
875  //
876  if (errorCode == SBG_NO_ERROR)
877  {
878  //
879  // The command has been executed successfully so return
880  //
881  break;
882  }
883  }
884  else
885  {
886  //
887  // We have a write error so exit the try loop
888  //
889  break;
890  }
891  }
892  }
893  else
894  {
895  //
896  // Invalid protocol handle.
897  //
898  errorCode = SBG_NULL_POINTER;
899  }
900 
901  return errorCode;
902 }
This file implements SbgECom commands related to outputs.
SBG_INLINE SbgErrorCode sbgStreamBufferInitForRead(SbgStreamBuffer *pHandle, const void *pLinkedBuffer, size_t bufferSize)
SbgErrorCode sbgEComCmdOutputGetLegacyConf(SbgEComHandle *pHandle, SbgEComOutputPort outputPort, SbgEComLegacyConf *pConf)
SbgErrorCode sbgEComReceiveCmd(SbgEComHandle *pHandle, uint8 msgClass, uint8 msg, void *pData, size_t *pSize, size_t maxSize, uint32 timeOut)
SbgErrorCode sbgEComCmdOutputSetLegacyConf(SbgEComHandle *pHandle, SbgEComOutputPort outputPort, const SbgEComLegacyConf *pConf)
SBG_INLINE SbgErrorCode sbgStreamBufferWriteUint8(SbgStreamBuffer *pHandle, uint8 value)
unsigned int uint32
Definition: sbgTypes.h:58
SbgErrorCode sbgEComCmdCanOutputSetConf(SbgEComHandle *pHandle, SbgECanMessageId internalId, SbgEComOutputMode mode, uint32 userId, bool extended)
SbgErrorCode sbgEComCmdOutputSetConf(SbgEComHandle *pHandle, SbgEComOutputPort outputPort, SbgEComClass classId, SbgEComMsgId msgId, SbgEComOutputMode conf)
Used to read/write data from/to a memory buffer stream.
SbgEComLegacyEndian endian
SbgErrorCode sbgEComCmdOutputClassGetEnable(SbgEComHandle *pHandle, SbgEComOutputPort outputPort, SbgEComClass classId, bool *pEnable)
SBG_INLINE uint16 sbgStreamBufferReadUint16LE(SbgStreamBuffer *pHandle)
enum _SbgEComLegacyFormat SbgEComLegacyFormat
enum _SbgECanMessageId SbgECanMessageId
SbgErrorCode sbgEComWaitForAck(SbgEComHandle *pHandle, uint8 msgClass, uint8 msg, uint32 timeOut)
SbgEComProtocol protocolHandle
Definition: sbgECom.h:82
SBG_INLINE SbgErrorCode sbgStreamBufferInitForWrite(SbgStreamBuffer *pHandle, void *pLinkedBuffer, size_t bufferSize)
SbgEComOutputMode mode
SbgEComLegacyFormat format
SbgErrorCode sbgEComCmdOutputSetNmeaTalkerId(SbgEComHandle *pHandle, SbgEComOutputPort outputPort, const char nmeaTalkerId[2])
SbgErrorCode sbgEComProtocolSend(SbgEComProtocol *pHandle, uint8 msgClass, uint8 msg, const void *pData, size_t size)
SbgErrorCode sbgEComCmdOutputGetNmeaTalkerId(SbgEComHandle *pHandle, SbgEComOutputPort outputPort, char nmeaTalkerId[2])
#define sbgStreamBufferWriteUint8LE
SBG_INLINE void * sbgStreamBufferGetLinkedBuffer(SbgStreamBuffer *pHandle)
uint32 numTrials
Definition: sbgECom.h:86
uint32 cmdDefaultTimeOut
Definition: sbgECom.h:87
SBG_INLINE uint32 sbgStreamBufferReadUint32LE(SbgStreamBuffer *pHandle)
SBG_INLINE SbgErrorCode sbgStreamBufferWriteUint16LE(SbgStreamBuffer *pHandle, uint16 value)
SbgErrorCode sbgEComCmdOutputGetConf(SbgEComHandle *pHandle, SbgEComOutputPort outputPort, SbgEComClass classId, SbgEComMsgId msgId, SbgEComOutputMode *pConf)
#define sbgStreamBufferReadUint8LE
uint8 SbgEComMsgId
Definition: sbgEComIds.h:278
SBG_INLINE SbgErrorCode sbgStreamBufferWriteUint32LE(SbgStreamBuffer *pHandle, uint32 value)
enum _SbgEComLegacyEndian SbgEComLegacyEndian
enum _SbgEComOutputPort SbgEComOutputPort
unsigned char uint8
Definition: sbgTypes.h:56
enum _SbgEComClass SbgEComClass
SbgErrorCode sbgEComCmdCanOutputGetConf(SbgEComHandle *pHandle, SbgECanMessageId internalId, SbgEComOutputMode *pMode, uint32 *pUserId, bool *pExtended)
SBG_INLINE size_t sbgStreamBufferGetLength(SbgStreamBuffer *pHandle)
enum _SbgEComOutputMode SbgEComOutputMode
unsigned short uint16
Definition: sbgTypes.h:57
enum _SbgErrorCode SbgErrorCode
#define SBG_ECOM_MAX_BUFFER_SIZE
SbgErrorCode sbgEComCmdOutputClassSetEnable(SbgEComHandle *pHandle, SbgEComOutputPort outputPort, SbgEComClass classId, bool enable)


sbg_driver
Author(s):
autogenerated on Sun Jan 27 2019 03:42:20