Function cras::sizeOfPointField(int)

Function Documentation

size_t cras::sizeOfPointField(int datatype)

Return the size (in bytes) of a sensor_msgs::msg::PointField datatype.

Parameters:

datatype[in] The datatype (one of sensor_msgs::msg::PointField::(U?INT(8|16|32)|FLOAT(32|64)) constants).

Throws:

std::runtime_error – if wrong datatype is passed.

Returns:

Size of the datatype in bytes.