BASIS 2 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Public Member Functions | List of all members
alicat_basis2::Request Class Reference

One validated request. Only the factories of the grammar headers make one that can be sent. More...

#include <alicat_basis2_request.hpp>

Public Member Functions

constexpr Request () noexcept=default
 An empty request: it has no bytes and Submit() refuses it.
 
std::span< const uint8_t > Bytes () const noexcept
 
Command GetCommand () const noexcept
 
char Id () const noexcept
 
char AltId () const noexcept
 
bool IsModbus () const noexcept
 
bool IsSlow () const noexcept
 
bool IsGuarded () const noexcept
 
bool IsIdempotent () const noexcept
 
uint16_t ReplyChars () const noexcept
 
uint32_t ExtraMs () const noexcept
 
uint32_t HoldoffMs () const noexcept
 
uint8_t Function () const noexcept
 
void SetTiming (uint32_t extra_ms, uint32_t holdoff_ms) noexcept
 Set the durations that depend on the configuration.
 

Detailed Description

One validated request. Only the factories of the grammar headers make one that can be sent.

Member Function Documentation

◆ AltId()

char alicat_basis2::Request::AltId ( ) const
inlinenoexcept
Returns
A second accepted reply ID (@= only), else NUL.

◆ Bytes()

std::span< const uint8_t > alicat_basis2::Request::Bytes ( ) const
inlinenoexcept
Returns
The wire bytes.

◆ ExtraMs()

uint32_t alicat_basis2::Request::ExtraMs ( ) const
inlinenoexcept
Returns
Duration added to the reply wait, in milliseconds.

◆ Function()

uint8_t alicat_basis2::Request::Function ( ) const
inlinenoexcept
Returns
The Modbus function code, 0 for ASCII.

◆ GetCommand()

Command alicat_basis2::Request::GetCommand ( ) const
inlinenoexcept
Returns
The command.

◆ HoldoffMs()

uint32_t alicat_basis2::Request::HoldoffMs ( ) const
inlinenoexcept
Returns
Milliseconds the bus stays closed after the send.

◆ Id()

char alicat_basis2::Request::Id ( ) const
inlinenoexcept
Returns
The addressed unit ID, or the Modbus address as a char.

◆ IsGuarded()

bool alicat_basis2::Request::IsGuarded ( ) const
inlinenoexcept
Returns
true for the six guarded commands.

◆ IsIdempotent()

bool alicat_basis2::Request::IsIdempotent ( ) const
inlinenoexcept
Returns
true for a read that may be repeated.

◆ IsModbus()

bool alicat_basis2::Request::IsModbus ( ) const
inlinenoexcept
Returns
true for a Modbus frame.

◆ IsSlow()

bool alicat_basis2::Request::IsSlow ( ) const
inlinenoexcept
Returns
true when the command may write non-volatile memory.

◆ ReplyChars()

uint16_t alicat_basis2::Request::ReplyChars ( ) const
inlinenoexcept
Returns
The most characters (bytes) the reply holds.

◆ SetTiming()

void alicat_basis2::Request::SetTiming ( uint32_t  extra_ms,
uint32_t  holdoff_ms 
)
inlinenoexcept

Set the durations that depend on the configuration.

Parameters
extra_msAdded to the reply wait.
holdoff_msThe bus stays closed this long after the send. Bus::Submit() refuses a request with either above 600000 ms (InvalidArgument).

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