Byte Ordering Functions

This group of functions are useful for ordering of bytes sent/received from VectorNav sensors. More...

## Functions

uint16_t | stoh16 (uint16_t sensorOrdered)
| Converts a 16-bit integer in sensor order to host order. More...
uint32_t | stoh32 (uint32_t sensorOrdered)
| Converts a 32-bit integer in sensor order to host order. More...
uint64_t | stoh64 (uint64_t sensorOrdered)
| Converts a 64-bit integer in sensor order to host order. More...
uint16_t | htos16 (uint16_t hostOrdered)
| Converts a 16-bit integer in host order to sensor order. More...
uint32_t | htos32 (uint32_t hostOrdered)
| Converts a 32-bit integer in host order to sensor order. More...
uint64_t | htos64 (uint64_t hostOrdered)
| Converts a 64-bit integer in host order to sensor order. More...
float | htosf4 (float hostOrdered)
| Converts a 4-byte float in host order to sensor order. More...
double | htosf8 (double hostOrdered)
| Converts an 8-byte float in host order to sensor order. More...

## Detailed Description

This group of functions are useful for ordering of bytes sent/received from VectorNav sensors.

## Function Documentation

uint16_t htos16 | ( | uint16_t | hostOrdered | ) |

Converts a 16-bit integer in host order to sensor order.

Parameters

  [in] | hostOrdered | The 16-bit integer in host order.

Returns
  The value converted to sensor ordered.

uint32_t htos32 | ( | uint32_t | hostOrdered | ) |

Converts a 32-bit integer in host order to sensor order.

Parameters

  [in] | hostOrdered | The 32-bit integer in host order.

Returns
  The value converted to sensor ordered.

uint64_t htos64 | ( | uint64_t | hostOrdered | ) |

Converts a 64-bit integer in host order to sensor order.

Parameters

  [in] | hostOrdered | The 64-bit integer in host order.

Returns
  The value converted to sensor ordered.

float htosf4 | ( | float | hostOrdered | ) |

Converts a 4-byte float in host order to sensor order.

Parameters

  [in] | hostOrdered | The 4-byte float in host order.

Returns
  The value converted to sensor ordered.

double htosf8 | ( | double | hostOrdered | ) |

Converts an 8-byte float in host order to sensor order.

Parameters

  [in] | hostOrdered | The 8-byte float in host order.

Returns
  The value converted to sensor ordered.

uint16_t stoh16 | ( | uint16_t | sensorOrdered | ) |

Converts a 16-bit integer in sensor order to host order.

Parameters

  [in] | sensorOrdered | The 16-bit integer in sensor order.

Returns
  The value converted to host ordered.

uint32_t stoh32 | ( | uint32_t | sensorOrdered | ) |

Converts a 32-bit integer in sensor order to host order.

Parameters

  [in] | sensorOrdered | The 32-bit integer in sensor order.

Returns
  The value converted to host ordered.

uint64_t stoh64 | ( | uint64_t | sensorOrdered | ) |

Converts a 64-bit integer in sensor order to host order.

Parameters

  [in] | sensorOrdered | The 64-bit integer in sensor order.

Returns
  The value converted to host ordered.