MIP_SDK
latest-2-g34f3e39
MicroStrain Communications Library for embedded systems
|
Go to the documentation of this file.
10 #include <type_traits>
53 using isField = std::is_base_of<FieldStruct, T>;
61 template<
typename DerivedT>
struct Bitfield {};
96 template<
class MipCmd>
bool isCommandDescriptorSet(uint8_t descriptorSet)
Definition: mip_descriptors.hpp:80
A collection of C++ classes and functions covering the full mip api.
Definition: commands_3dm.c:11
uint8_t descriptorSet
MIP descriptor set.
Definition: mip_descriptors.hpp:23
@ MIP_FUNCTION_READ
Definition: mip_descriptors.h:45
bool mip_is_gnss_data_descriptor_set(uint8_t descriptor_set)
Determines if the descriptor set represents some kind of GNSS data.
Definition: mip_descriptors.c:70
CompositeDescriptor & operator=(uint16_t combo)
Definition: mip_descriptors.hpp:29
Serializes or deserializes data to/from a byte buffer.
Definition: serializer.hpp:125
constexpr CompositeDescriptor(uint16_t combo)
Definition: mip_descriptors.hpp:27
bool mip_is_data_descriptor_set(uint8_t descriptor_set)
Determines if the descriptor set represents some kind of data.
Definition: mip_descriptors.c:34
bool isSharedDataFieldDescriptor(uint8_t fieldDescriptor)
Definition: mip_descriptors.hpp:89
constexpr bool operator<(const CompositeDescriptor &other) const
Definition: mip_descriptors.hpp:36
bool isGnssDataDescriptorSet(uint8_t descriptorSet)
Definition: mip_descriptors.hpp:82
bool isCommandFieldDescriptor(uint8_t fieldDescriptor)
Definition: mip_descriptors.hpp:85
static constexpr CompositeDescriptor DESCRIPTOR
The command descriptor.
Definition: mip_descriptors.hpp:108
std::enable_if< isField< T >::value, T > EnableForFieldTypes
Definition: mip_descriptors.hpp:56
bool isDataDescriptorSet(uint8_t descriptorSet)
Definition: mip_descriptors.hpp:79
bool isValidFieldDescriptor(uint8_t fieldDescriptor)
Definition: mip_descriptors.hpp:84
constexpr bool operator==(const CompositeDescriptor &other) const
Definition: mip_descriptors.hpp:35
constexpr CompositeDescriptor descriptor() const
Returns the composite descriptor of the command.
Definition: mip_descriptors.hpp:113
size_t insert(Serializer &serializer, const Vector< T, N > &v)
Definition: common.hpp:130
@ MIP_FUNCTION_RESET
Definition: mip_descriptors.h:48
FunctionSelector
Definition: mip_descriptors.hpp:66
Represents the status of a MIP command.
Definition: mip_result.hpp:24
Definition: mip_descriptors.hpp:42
TypedResult(CmdResult existing)
Definition: mip_descriptors.hpp:103
bool isResponseFieldDescriptor(uint8_t fieldDescriptor)
Definition: mip_descriptors.hpp:87
bool mip_is_reserved_cmd_field_descriptor(uint8_t field_descriptor)
Determines if the field descriptor is reserved.
Definition: mip_descriptors.c:137
MipCmd Cmd
Definition: mip_descriptors.hpp:99
bool isValidDescriptorSet(uint8_t descriptorSet)
Definition: mip_descriptors.hpp:78
@ MIP_FUNCTION_LOAD
Definition: mip_descriptors.h:47
bool isReplyFieldDescriptor(uint8_t fieldDescriptor)
Definition: mip_descriptors.hpp:86
bool mip_is_reply_field_descriptor(uint8_t field_descriptor)
Determines if the field descriptor is for an ack/nack reply.
Definition: mip_descriptors.c:108
@ MIP_INVALID_FIELD_DESCRIPTOR
Definition: mip_descriptors.h:21
@ MIP_INVALID_DESCRIPTOR_SET
Definition: mip_descriptors.h:17
@ MIP_FUNCTION_SAVE
Definition: mip_descriptors.h:46
@ MIP_FUNCTION_WRITE
Definition: mip_descriptors.h:44
bool mip_is_reserved_descriptor_set(uint8_t descriptor_set)
Determines if the descriptor is reserved for special purposes.
Definition: mip_descriptors.c:58
bool mip_is_valid_field_descriptor(uint8_t field_descriptor)
Determines if the field descriptor is valid.
Definition: mip_descriptors.c:84
constexpr CompositeDescriptor(uint8_t descSet, uint8_t fieldDesc)
Definition: mip_descriptors.hpp:26
bool mip_is_valid_descriptor_set(uint8_t descriptor_set)
Determines if the descriptor set is valid.
Definition: mip_descriptors.c:22
constexpr uint16_t as_u16() const
Definition: mip_descriptors.hpp:31
uint8_t fieldDescriptor
MIP field descriptor.
Definition: mip_descriptors.hpp:24
bool mip_is_response_field_descriptor(uint8_t field_descriptor)
Determines if the field descriptor contains response data from a command.
Definition: mip_descriptors.c:123
Convenience struct holding both descriptor set and field descriptor.
Definition: mip_descriptors.hpp:21
bool isReservedFieldDescriptor(uint8_t fieldDescriptor)
Definition: mip_descriptors.hpp:88
bool mip_is_shared_data_field_descriptor(uint8_t field_descriptor)
Determines if the field descriptor is from the shared data set.
Definition: mip_descriptors.c:151
bool isReservedDescriptorSet(uint8_t descriptorSet)
Definition: mip_descriptors.hpp:81
std::is_base_of< FieldStruct, T > isField
Definition: mip_descriptors.hpp:53
A dummy struct which is used to mark bitfield objects.
Definition: mip_descriptors.hpp:61
constexpr CmdResult()
Definition: mip_result.hpp:47
A CmdResult that knows the corresponding command type.
Definition: mip_descriptors.hpp:97
bool mip_is_cmd_descriptor_set(uint8_t descriptor_set)
Determines if the descriptor set contains commands.
Definition: mip_descriptors.c:46
bool mip_is_cmd_field_descriptor(uint8_t field_descriptor)
Determines if the field descriptor is a command.
Definition: mip_descriptors.c:96
size_t extract(Serializer &serializer, Vector< T, N > &v)
Definition: common.hpp:133