MIP_SDK
latest-2-g34f3e39
MicroStrain Communications Library for embedded systems
|
Go to the documentation of this file.
16 namespace commands_system {
49 static constexpr
const uint8_t MIP_SYSTEM_COMMAND_COMM_MODE_PASSTHRU = 0x00;
50 static constexpr
const uint8_t MIP_SYSTEM_COMMAND_COMM_MODE_NORMAL = 0x01;
51 static constexpr
const uint8_t MIP_SYSTEM_COMMAND_COMM_MODE_IMU = 0x02;
52 static constexpr
const uint8_t MIP_SYSTEM_COMMAND_COMM_MODE_GPS = 0x03;
81 operator uint32_t()
const {
return value; }
129 static constexpr
const char*
NAME =
"CommMode";
130 static constexpr
const char*
DOC_NAME =
"CommMode";
135 return std::make_tuple(
mode);
140 return std::make_tuple(std::ref(
mode));
163 static constexpr
const char*
NAME =
"CommMode::Response";
164 static constexpr
const char*
DOC_NAME =
"CommMode Response";
169 return std::make_tuple(
mode);
174 return std::make_tuple(std::ref(
mode));
220 static constexpr
const char*
NAME =
"InterfaceControl";
221 static constexpr
const char*
DOC_NAME =
"Interface Control";
257 static constexpr
const char*
NAME =
"InterfaceControl::Response";
258 static constexpr
const char*
DOC_NAME =
"Interface Control Response";
@ MAIN
An alias that directs to Main USB if it's connected, or Main UART otherwise.
CommsProtocol & operator=(int val)
Definition: commands_system.hpp:83
auto asTuple()
Definition: commands_system.hpp:266
A collection of C++ classes and functions covering the full mip api.
Definition: commands_3dm.c:11
uint32_t value
Definition: commands_system.hpp:77
@ CMD_HARDWARE_CONTROL_2
Definition: commands_system.hpp:37
@ UART_1
Depending on your device, this may mean either the first UART currently configured,...
@ CMD_HARDWARE_CONTROL
Definition: commands_system.hpp:36
@ ALL
Definition: commands_system.hpp:75
Definition: commands_system.hpp:208
auto asTuple() const
Definition: commands_system.hpp:224
TypedResult< CommMode > defaultCommMode(C::mip_interface &device)
Definition: commands_system.cpp:90
static constexpr const char * NAME
Definition: commands_system.hpp:220
void insert(Serializer &serializer) const
Serialization.
Definition: commands_system.cpp:23
void nmea(bool val)
Definition: commands_system.hpp:92
bool mipData() const
Definition: commands_system.hpp:89
Serializes or deserializes data to/from a byte buffer.
Definition: serializer.hpp:125
static constexpr const char * NAME
Definition: commands_system.hpp:257
void extract(Serializer &serializer)
Definition: commands_system.cpp:33
CommsInterface
Definition: commands_system.hpp:53
auto asTuple()
Definition: commands_system.hpp:138
void insert(Serializer &serializer) const
Serialization.
Definition: commands_system.cpp:100
static InterfaceControl create_sld_all(::mip::FunctionSelector function)
Definition: commands_system.hpp:234
@ CMD_ENUMERATE
Definition: commands_system.hpp:33
FunctionSelector function
Parameters.
Definition: commands_system.hpp:211
static constexpr const CompositeDescriptor DESCRIPTOR
Definition: commands_system.hpp:256
auto asTuple() const
Definition: commands_system.hpp:167
TypedResult< InterfaceControl > defaultInterfaceControl(C::mip_interface &device, CommsInterface port)
Definition: commands_system.cpp:218
CommsProtocol(int val)
Definition: commands_system.hpp:80
struct mip::C::mip_interface mip_interface
State of the interface for communicating with a MIP device.
static constexpr const char * DOC_NAME
Definition: commands_system.hpp:164
void extract(Serializer &serializer)
Definition: commands_system.cpp:138
@ USB_1
The first virtual serial port over USB (ie. COM5)
static constexpr const uint8_t FIELD_DESCRIPTOR
Definition: commands_system.hpp:161
static CommMode create_sld_all(::mip::FunctionSelector function)
Definition: commands_system.hpp:143
Definition: commands_system.hpp:246
CommsInterface port
Which physical interface is being selected (USB, serial, etc)
Definition: commands_system.hpp:212
void mipData(bool val)
Definition: commands_system.hpp:90
void insert(Serializer &serializer) const
Serialization.
Definition: commands_system.cpp:44
@ USB_2
The second virtual serial port over USB (ie. COM6), only available on GNSS/INS devices....
CommsProtocol protocols_incoming
Input protocol(s) the port will accept. If the protocol supports ACK/NACK or detailed responses,...
Definition: commands_system.hpp:250
auto asTuple() const
Definition: commands_system.hpp:133
@ SPARTN
Definition: commands_system.hpp:74
@ REPLY_COM_MODE
Definition: commands_system.hpp:39
@ NONE
Definition: commands_system.hpp:69
TypedResult< CommMode > writeCommMode(C::mip_interface &device, uint8_t mode)
Definition: commands_system.cpp:55
CommsInterface port
Parameters.
Definition: commands_system.hpp:249
bool mipCommands() const
Definition: commands_system.hpp:87
FunctionSelector
Definition: mip_descriptors.hpp:66
CommsProtocol protocols_outgoing
Data protocol(s) the port will output.
Definition: commands_system.hpp:251
Definition: commands_system.hpp:64
Definition: commands_system.hpp:154
static constexpr const char * DOC_NAME
Definition: commands_system.hpp:221
auto asTuple()
Definition: commands_system.hpp:172
static constexpr const bool HAS_FUNCTION_SELECTOR
Definition: commands_system.hpp:165
static constexpr const char * NAME
Definition: commands_system.hpp:163
static constexpr const char * NAME
Definition: commands_system.hpp:129
static constexpr const bool HAS_FUNCTION_SELECTOR
Definition: commands_system.hpp:131
static constexpr const bool HAS_FUNCTION_SELECTOR
Definition: commands_system.hpp:222
static constexpr const uint8_t DESCRIPTOR_SET
Descriptors.
Definition: commands_system.hpp:254
static constexpr const uint8_t FIELD_DESCRIPTOR
Definition: commands_system.hpp:127
static constexpr const uint8_t FIELD_DESCRIPTOR
Definition: commands_system.hpp:255
@ CMD_INTERFACE_CONTROL
Definition: commands_system.hpp:34
CommsProtocol & operator=(uint32_t val)
Definition: commands_system.hpp:82
@ REPLY_HARDWARE_CONTROL_2
Definition: commands_system.hpp:41
@ CMD_COM_MODE
Definition: commands_system.hpp:35
auto asTuple() const
Definition: commands_system.hpp:261
State of the interface for communicating with a MIP device.
Definition: mip_interface.h:44
TypedResult< InterfaceControl > readInterfaceControl(C::mip_interface &device, CommsInterface port, CommsProtocol *protocolsIncomingOut, CommsProtocol *protocolsOutgoingOut)
Definition: commands_system.cpp:164
@ REPLY_HARDWARE_CONTROL
Definition: commands_system.hpp:40
static constexpr const char * DOC_NAME
Definition: commands_system.hpp:130
@ NMEA
Definition: commands_system.hpp:72
TypedResult< InterfaceControl > saveInterfaceControl(C::mip_interface &device, CommsInterface port)
Definition: commands_system.cpp:194
FunctionSelector function
Parameters.
Definition: commands_system.hpp:122
static constexpr const CompositeDescriptor DESCRIPTOR
Definition: commands_system.hpp:128
bool nmea() const
Definition: commands_system.hpp:91
bool rtcm() const
Definition: commands_system.hpp:93
auto asTuple()
Definition: commands_system.hpp:229
CommsProtocol & operator&=(uint32_t val)
Definition: commands_system.hpp:85
CommsProtocol & operator|=(uint32_t val)
Definition: commands_system.hpp:84
static constexpr const uint8_t FIELD_DESCRIPTOR
Definition: commands_system.hpp:218
@ RTCM
Definition: commands_system.hpp:73
@ MIP_DATA
Definition: commands_system.hpp:71
void extract(Serializer &serializer)
Definition: commands_system.cpp:114
uint8_t mode
Parameters.
Definition: commands_system.hpp:157
_enumType
Definition: commands_system.hpp:67
static constexpr const bool HAS_FUNCTION_SELECTOR
Definition: commands_system.hpp:259
uint32_t Type
Definition: commands_system.hpp:66
CommsProtocol protocols_incoming
Input protocol(s) the port will accept. If the protocol supports ACK/NACK or detailed responses,...
Definition: commands_system.hpp:213
@ REPLY_INTERFACE_CONTROL
Definition: commands_system.hpp:42
CommsProtocol protocols_outgoing
Data protocol(s) the port will output.
Definition: commands_system.hpp:214
void spartn(bool val)
Definition: commands_system.hpp:96
TypedResult< CommMode > readCommMode(C::mip_interface &device, uint8_t *modeOut)
Definition: commands_system.cpp:67
void extract(Serializer &serializer)
Definition: commands_system.cpp:49
static constexpr const CompositeDescriptor DESCRIPTOR
Definition: commands_system.hpp:162
void insert(Serializer &serializer) const
Serialization.
Definition: commands_system.cpp:129
static constexpr const uint8_t DESCRIPTOR_SET
Descriptors.
Definition: commands_system.hpp:126
static constexpr const uint8_t DESCRIPTOR_SET
Descriptors.
Definition: commands_system.hpp:160
static constexpr const CompositeDescriptor DESCRIPTOR
Definition: commands_system.hpp:219
Convenience struct holding both descriptor set and field descriptor.
Definition: mip_descriptors.hpp:21
TypedResult< InterfaceControl > loadInterfaceControl(C::mip_interface &device, CommsInterface port)
Definition: commands_system.cpp:206
void rtcm(bool val)
Definition: commands_system.hpp:94
@ DESCRIPTOR_SET
Definition: commands_system.hpp:31
void setAll()
Definition: commands_system.hpp:98
@ MIP_COMMANDS
Definition: commands_system.hpp:70
A dummy struct which is used to mark bitfield objects.
Definition: mip_descriptors.hpp:61
Definition: commands_system.hpp:119
static constexpr const uint8_t DESCRIPTOR_SET
Descriptors.
Definition: commands_system.hpp:217
static constexpr const char * DOC_NAME
Definition: commands_system.hpp:258
bool spartn() const
Definition: commands_system.hpp:95
A CmdResult that knows the corresponding command type.
Definition: mip_descriptors.hpp:97
CommsProtocol()
Definition: commands_system.hpp:79
uint8_t mode
Definition: commands_system.hpp:123
TypedResult< InterfaceControl > writeInterfaceControl(C::mip_interface &device, CommsInterface port, CommsProtocol protocolsIncoming, CommsProtocol protocolsOutgoing)
Definition: commands_system.cpp:148
bool allSet() const
Definition: commands_system.hpp:97
void mipCommands(bool val)
Definition: commands_system.hpp:88