API Documentation
Loading...
Searching...
No Matches
HardwareCommandQueue< t_type > Class Template Referenceabstract

A base class for communicating with Hardware, typically firmware by the software. Commands a queued up and sent, before waiting for a response for each command. More...

#include <HardwareCommandQueue.h>

Collaboration diagram for HardwareCommandQueue< t_type >:
[legend]

Classes

struct  CommandQueueItem
 
struct  CommandRecord
 

Public Member Functions

void addCommandToFront (t_type command, const String &args=String(), const String &regex=String())
 
virtual bool allowMultipleCommandsInStream (t_type command, const String &args) const
 
uint04 bufferOffset () const
 
virtual void cancelCommand ()
 
void clearCommands ()
 
CommandInformation commandInformation (t_type command)
 
TimeSpan commandTimeout () const
 
const StringcurrentArgs () const
 
t_type currentCommand () const
 
const StringcurrentRegex () const
 
void disableCommand (t_type command)
 
virtual void endCommandQueue ()
 
virtual void executeCommand (const t_type &command, const String &args)=0
 
void executeCommandBlocking (const t_type &command, const String &args=String())
 
void finishCommand ()
 
String getCommandCSVInfo (bool only_supported, bool include_identity_info, char deliminator=',') const
 
JSONNode getCommandJSONInfo (bool only_supported) const
 
bool hasPending () const
 
bool hasPendingCommand (t_type command) const
 
virtual void onFailure (const t_type &command)
 
bool popCommandAndExecute ()
 
void postCommand (t_type command, const String &args=String(), const String &regex=String())
 
void removeCommand (t_type command)
 
virtual void retryCommand ()
 
TimeSpan rxDelay () const
 
void setBufferOffset (uint04 buffer_offset)
 
void setFromJSONInfo (const JSONNode &root, bool allow_command_override, ProgressInfo *log)
 
void setSupport (t_type command, CommandSupport support)
 
void setSupported (t_type command, bool supported)
 
virtual bool supportsCommand (t_type command) const
 
TimeSpan txDelay () const
 

Static Public Attributes

static const uint04 s_buffer_size = 256000
 

Protected Attributes

uint04 m_buffer_offset = 0
 
Dictionary< t_type, CommandInformationm_command_info
 
CommandQueueItem m_current_command
 
Time m_current_command_start_time = Constant<Time>::Invalid
 
Buffer< CommandQueueItemm_ordered_commands
 
CommandQueueItem m_pending_block_command
 
Dictionary< t_type, uint04m_pending_commands
 
Buffer< CommandRecordm_records
 

Detailed Description

template<class t_type>
class NDEVR::HardwareCommandQueue< t_type >

A base class for communicating with Hardware, typically firmware by the software. Commands a queued up and sent, before waiting for a response for each command.


Member Function Documentation

◆ addCommandToFront()

template<class t_type >
void addCommandToFront ( t_type command,
const String & args = String(),
const String & regex = String() )
inline

◆ allowMultipleCommandsInStream()

template<class t_type >
virtual bool allowMultipleCommandsInStream ( t_type command,
const String & args ) const
inlinevirtual

◆ bufferOffset()

template<class t_type >
uint04 bufferOffset ( ) const
inline

◆ cancelCommand()

template<class t_type >
virtual void cancelCommand ( )
inlinevirtual

◆ clearCommands()

template<class t_type >
void clearCommands ( )
inline

◆ commandInformation()

template<class t_type >
CommandInformation commandInformation ( t_type command)
inline

◆ commandTimeout()

template<class t_type >
TimeSpan commandTimeout ( ) const
inline

◆ currentArgs()

template<class t_type >
const String & currentArgs ( ) const
inline

◆ currentCommand()

template<class t_type >
t_type currentCommand ( ) const
inline

◆ currentRegex()

template<class t_type >
const String & currentRegex ( ) const
inline

◆ disableCommand()

template<class t_type >
void disableCommand ( t_type command)
inline

◆ endCommandQueue()

template<class t_type >
virtual void endCommandQueue ( )
inlinevirtual

◆ executeCommand()

template<class t_type >
virtual void executeCommand ( const t_type & command,
const String & args )
pure virtual

◆ executeCommandBlocking()

template<class t_type >
void executeCommandBlocking ( const t_type & command,
const String & args = String() )
inline

◆ finishCommand()

template<class t_type >
void finishCommand ( )
inline

◆ getCommandCSVInfo()

template<class t_type >
String getCommandCSVInfo ( bool only_supported,
bool include_identity_info,
char deliminator = ',' ) const
inline

◆ getCommandJSONInfo()

template<class t_type >
JSONNode getCommandJSONInfo ( bool only_supported) const
inline

◆ hasPending()

template<class t_type >
bool hasPending ( ) const
inline

◆ hasPendingCommand()

template<class t_type >
bool hasPendingCommand ( t_type command) const
inline

◆ onFailure()

template<class t_type >
virtual void onFailure ( const t_type & command)
inlinevirtual

◆ popCommandAndExecute()

template<class t_type >
bool popCommandAndExecute ( )
inline

◆ postCommand()

template<class t_type >
void postCommand ( t_type command,
const String & args = String(),
const String & regex = String() )
inline

◆ removeCommand()

template<class t_type >
void removeCommand ( t_type command)
inline

◆ retryCommand()

template<class t_type >
virtual void retryCommand ( )
inlinevirtual

◆ rxDelay()

template<class t_type >
TimeSpan rxDelay ( ) const
inline

◆ setBufferOffset()

template<class t_type >
void setBufferOffset ( uint04 buffer_offset)
inline

◆ setFromJSONInfo()

template<class t_type >
void setFromJSONInfo ( const JSONNode & root,
bool allow_command_override,
ProgressInfo * log )
inline

◆ setSupport()

template<class t_type >
void setSupport ( t_type command,
CommandSupport support )
inline

◆ setSupported()

template<class t_type >
void setSupported ( t_type command,
bool supported )
inline

◆ supportsCommand()

template<class t_type >
virtual bool supportsCommand ( t_type command) const
inlinevirtual

◆ txDelay()

template<class t_type >
TimeSpan txDelay ( ) const
inline

Member Data Documentation

◆ m_buffer_offset

template<class t_type >
uint04 m_buffer_offset = 0
protected

◆ m_command_info

template<class t_type >
Dictionary<t_type, CommandInformation> m_command_info
protected

◆ m_current_command

template<class t_type >
CommandQueueItem m_current_command
protected

◆ m_current_command_start_time

template<class t_type >
Time m_current_command_start_time = Constant<Time>::Invalid
protected

◆ m_ordered_commands

template<class t_type >
Buffer<CommandQueueItem> m_ordered_commands
protected

◆ m_pending_block_command

template<class t_type >
CommandQueueItem m_pending_block_command
protected

◆ m_pending_commands

template<class t_type >
Dictionary<t_type, uint04> m_pending_commands
protected

◆ m_records

template<class t_type >
Buffer<CommandRecord> m_records
protected

◆ s_buffer_size

template<class t_type >
const uint04 s_buffer_size = 256000
static

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