Basic implementation of Xbus message parsing and generation for embedded processors. The code has no dependencies and should also work for other MCU architectures than ARM provided a C99 compiler is available.
Dependents: MTi-1_example_LPC1768 MTi-1_rikbeun MTi-1_example MTi-1_example ... more
xbusmessage.h File Reference
Go to the source code of this file.
Data Structures | |
struct | XbusMessage |
An Xbus message structure with optional payload. More... | |
struct | OutputConfiguration |
Output configuration structure. More... | |
Enumerations | |
enum | XsMessageId |
Xbus message IDs. More... | |
enum | XsDataIdentifier |
Xbus data message type IDs. More... | |
enum | XbusLowLevelFormat { XLLF_I2c, XLLF_Spi, XLLF_Uart } |
Low level format to use when formating Xbus messages for transmission. More... | |
Functions | |
size_t | XbusMessage_format (uint8_t *raw, struct XbusMessage const *message, enum XbusLowLevelFormat format) |
Format a message into the raw Xbus format ready for transmission to a motion tracker. | |
bool | XbusMessage_getDataItem (void *item, enum XsDataIdentifier id, struct XbusMessage const *message) |
Get a data item from an XMID_MtData2 Xbus message. | |
char const * | XbusMessage_dataDescription (enum XsDataIdentifier id) |
Get a string description for the passed data identifier. |
Detailed Description
Copyright (C) Xsens Technologies B.V., 2015.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file xbusmessage.h.
Enumeration Type Documentation
enum XbusLowLevelFormat |
Low level format to use when formating Xbus messages for transmission.
- Enumerator:
XLLF_I2c Format for use with I2C interface.
XLLF_Spi Format for use with SPI interface.
XLLF_Uart Format for use with UART interface.
Definition at line 66 of file xbusmessage.h.
enum XsDataIdentifier |
Xbus data message type IDs.
Definition at line 50 of file xbusmessage.h.
enum XsMessageId |
Xbus message IDs.
Definition at line 30 of file xbusmessage.h.
Function Documentation
char const* XbusMessage_dataDescription | ( | enum XsDataIdentifier | id ) |
Get a string description for the passed data identifier.
Definition at line 226 of file xbusmessage.c.
size_t XbusMessage_format | ( | uint8_t * | raw, |
struct XbusMessage const * | message, | ||
enum XbusLowLevelFormat | format | ||
) |
Format a message into the raw Xbus format ready for transmission to a motion tracker.
Definition at line 76 of file xbusmessage.c.
bool XbusMessage_getDataItem | ( | void * | item, |
enum XsDataIdentifier | id, | ||
struct XbusMessage const * | message | ||
) |
Get a data item from an XMID_MtData2 Xbus message.
- Parameters:
-
item Pointer to where to store the data. id The data identifier to get. message The message to read the data item from.
- Returns:
- true if the data item is found in the message, else false.
Definition at line 184 of file xbusmessage.c.
Generated on Thu Jul 14 2022 08:57:02 by 1.7.2