MIP_SDK  v3.0.0
MicroStrain Communications Library for embedded systems
Public Types | Public Member Functions | Static Public Attributes | List of all members
mip::TypedResult< MipCmd > Struct Template Reference

A CmdResult that knows the corresponding command type. More...

#include <mip_descriptors.hpp>

Inheritance diagram for mip::TypedResult< MipCmd >:
mip::CmdResult

Public Types

using Cmd = MipCmd
 

Public Member Functions

constexpr CompositeDescriptor descriptor () const
 Returns the composite descriptor of the command. More...
 
constexpr CmdResult ()
 
constexpr CmdResult (C::mip_cmd_result result)
 
- Public Member Functions inherited from mip::CmdResult
constexpr CmdResult ()
 
constexpr CmdResult (C::mip_cmd_result result)
 
 ~CmdResult ()=default
 
CmdResultoperator= (const CmdResult &other)=default
 
CmdResultoperator= (C::mip_cmd_result other)
 
 operator const void * () const
 
bool operator! () const
 
constexpr bool operator== (CmdResult other) const
 
constexpr bool operator!= (CmdResult other) const
 
constexpr bool operator== (C::mip_cmd_result other) const
 
constexpr bool operator!= (C::mip_cmd_result other) const
 
const char * name () const
 
bool isReplyCode () const
 
bool isStatusCode () const
 
bool isFinished () const
 
bool isAck () const
 

Static Public Attributes

static constexpr CompositeDescriptor DESCRIPTOR = MipCmd::DESCRIPTOR
 The command descriptor. More...
 
- Static Public Attributes inherited from mip::CmdResult
static constexpr C::mip_cmd_result STATUS_USER = C::MIP_STATUS_USER_START
 Values defined by user code must be less than or equal to this value. More...
 
static constexpr C::mip_cmd_result STATUS_ERROR = C::MIP_STATUS_ERROR
 Command could not be executed (error sending/receiving) More...
 
static constexpr C::mip_cmd_result STATUS_CANCELLED = C::MIP_STATUS_CANCELLED
 Command was canceled in software. More...
 
static constexpr C::mip_cmd_result STATUS_TIMEDOUT = C::MIP_STATUS_TIMEDOUT
 Reply was not received before timeout expired. More...
 
static constexpr C::mip_cmd_result STATUS_WAITING = C::MIP_STATUS_WAITING
 Waiting for command reply (timeout timer has started). More...
 
static constexpr C::mip_cmd_result STATUS_QUEUED = C::MIP_STATUS_PENDING
 Command has been queued but the I/O update hasn't run yet. More...
 
static constexpr C::mip_cmd_result STATUS_NONE = C::MIP_STATUS_NONE
 Command has been initialized but not queued yet. More...
 
static constexpr C::mip_cmd_result ACK_OK = C::MIP_ACK_OK
 Command completed successfully. More...
 
static constexpr C::mip_cmd_result NACK_COMMAND_UNKNOWN = C::MIP_NACK_COMMAND_UNKNOWN
 Command not supported. More...
 
static constexpr C::mip_cmd_result NACK_INVALID_CHECKSUM = C::MIP_NACK_INVALID_CHECKSUM
 Reserved. More...
 
static constexpr C::mip_cmd_result NACK_INVALID_PARAM = C::MIP_NACK_INVALID_PARAM
 A parameter was not a supported value. More...
 
static constexpr C::mip_cmd_result NACK_COMMAND_FAILED = C::MIP_NACK_COMMAND_FAILED
 The device could not complete the command. More...
 
static constexpr C::mip_cmd_result NACK_COMMAND_TIMEOUT = C::MIP_NACK_COMMAND_TIMEOUT
 Internal device timeout. Use MIP_STATUS_TIMEDOUT for command timeouts. More...
 
static constexpr C::mip_cmd_result STATUS_PENDING = STATUS_QUEUED
 

Additional Inherited Members

- Static Public Member Functions inherited from mip::CmdResult
static constexpr CmdResult userResult (uint8_t n)
 
static constexpr CmdResult fromAckNack (uint8_t code)
 
- Public Attributes inherited from mip::CmdResult
C::mip_cmd_result value = C::MIP_STATUS_NONE
 

Detailed Description

template<class MipCmd>
struct mip::TypedResult< MipCmd >

A CmdResult that knows the corresponding command type.

Template Parameters
MipCmdType of the command struct.

Member Typedef Documentation

◆ Cmd

template<class MipCmd >
using mip::TypedResult< MipCmd >::Cmd = MipCmd

Member Function Documentation

◆ CmdResult() [1/2]

template<class MipCmd >
constexpr mip::CmdResult::CmdResult
inlineconstexpr

◆ CmdResult() [2/2]

template<class MipCmd >
constexpr mip::CmdResult::CmdResult
inlineconstexpr

◆ descriptor()

template<class MipCmd >
constexpr CompositeDescriptor mip::TypedResult< MipCmd >::descriptor ( ) const
inlineconstexpr

Returns the composite descriptor of the command.

Member Data Documentation

◆ DESCRIPTOR

template<class MipCmd >
constexpr CompositeDescriptor mip::TypedResult< MipCmd >::DESCRIPTOR = MipCmd::DESCRIPTOR
staticconstexpr

The command descriptor.


The documentation for this struct was generated from the following file: