0.4.1
Loading...
Searching...
No Matches
NAV::ArubaSensor Class Reference

Aruba Sensor Class. More...

Public Member Functions

 ArubaSensor ()
 Default constructor.
 
 ArubaSensor (ArubaSensor &&)=delete
 Move constructor.
 
 ArubaSensor (const ArubaSensor &)=delete
 Copy constructor.
 
void guiConfig () override
 ImGui config window which is shown on double click.
 
ArubaSensoroperator= (ArubaSensor &&)=delete
 Move assignment operator.
 
ArubaSensoroperator= (const ArubaSensor &)=delete
 Copy assignment operator.
 
bool resetNode () override
 Resets the node. It is guaranteed that the node is initialized when this is called.
 
void restore (const json &j) override
 Restores the node from a json object.
 
json save () const override
 Saves the node into a json object.
 
std::string type () const override
 String representation of the Class Type.
 
 ~ArubaSensor () override
 Destructor.
 
- Public Member Functions inherited from NAV::Node
virtual void afterCreateLink (OutputPin &startPin, InputPin &endPin)
 Called when a new link was established.
 
virtual void afterDeleteLink (OutputPin &startPin, InputPin &endPin)
 Called when a link was deleted.
 
bool doDeinitialize (bool wait=false)
 Asks the node worker to deinitialize the node.
 
bool doDisable (bool wait=false)
 Asks the node worker to disable the node.
 
bool doEnable ()
 Enable the node.
 
bool doInitialize (bool wait=false)
 Asks the node worker to initialize the node.
 
bool doReinitialize (bool wait=false)
 Asks the node worker to reinitialize the node.
 
virtual void flush ()
 Function called by the flow executer after finishing to flush out remaining data.
 
template<typename T>
std::optional< InputPin::IncomingLink::ValueWrapper< T > > getInputValue (size_t portIndex) const
 Get Input Value connected on the pin. Only const data types.
 
Mode getMode () const
 Get the current mode of the node.
 
const ImVec2 & getSize () const
 Get the size of the node.
 
State getState () const
 Get the current state of the node.
 
bool hasInputPinWithSameTime (const InsTime &insTime) const
 Checks wether there is an input pin with the same time.
 
InputPininputPinFromId (ax::NodeEditor::PinId pinId)
 Returns the pin with the given id.
 
size_t inputPinIndexFromId (ax::NodeEditor::PinId pinId) const
 Returns the index of the pin.
 
void invokeCallbacks (size_t portIndex, const std::shared_ptr< const NodeData > &data)
 Calls all registered callbacks on the specified output port.
 
bool isDisabled () const
 Checks if the node is disabled.
 
bool isInitialized () const
 Checks if the node is initialized.
 
bool isOnlyRealtime () const
 Checks if the node is only working in real time (sensors, network interfaces, ...)
 
bool isTransient () const
 Checks if the node is changing its state currently.
 
std::string nameId () const
 Node name and id.
 
 Node (const Node &)=delete
 Copy constructor.
 
 Node (Node &&)=delete
 Move constructor.
 
 Node (std::string name)
 Constructor.
 
void notifyOutputValueChanged (size_t pinIdx, const InsTime &insTime, const std::scoped_lock< std::mutex > &&guard)
 Notifies connected nodes about the change.
 
virtual bool onCreateLink (OutputPin &startPin, InputPin &endPin)
 Called when a new link is to be established.
 
virtual void onDeleteLink (OutputPin &startPin, InputPin &endPin)
 Called when a link is to be deleted.
 
Nodeoperator= (const Node &)=delete
 Copy assignment operator.
 
Nodeoperator= (Node &&)=delete
 Move assignment operator.
 
OutputPinoutputPinFromId (ax::NodeEditor::PinId pinId)
 Returns the pin with the given id.
 
size_t outputPinIndexFromId (ax::NodeEditor::PinId pinId) const
 Returns the index of the pin.
 
void releaseInputValue (size_t portIndex)
 Unblocks the connected node. Has to be called when the input value should be released and getInputValue was not called.
 
std::scoped_lock< std::mutex > requestOutputValueLock (size_t pinIdx)
 Blocks the thread till the output values was read by all connected nodes.
 
virtual void restoreAtferLink (const json &j)
 Restores link related properties of the node from a json object.
 
void wakeWorker ()
 Wakes the worker thread.
 
virtual ~Node ()
 Destructor.
 

Static Public Member Functions

static std::string category ()
 String representation of the Class Category.
 
static std::string typeStatic ()
 String representation of the Class Type.
 
- Static Public Member Functions inherited from NAV::Node
static std::string toString (State state)
 Converts the state into a printable text.
 

Private Member Functions

void deinitialize () override
 Deinitialize the node.
 
bool initialize () override
 Initialize the node.
 

Static Private Member Functions

static void readSensorDataThread (void *userData)
 Function which performs the async data reading.
 

Private Attributes

ssh_channel _channel
 SSH channel.
 
int _outputInterval
 Output interval in ms.
 
ssh_session _session
 SSH session.
 
std::string _sshHost
 Ssh options.
 
std::string _sshHostkeys
 SSH encryption.
 
std::string _sshKeyExchange
 Key exchange.
 
std::string _sshPassword
 User credentials.
 
std::string _sshPublickeyAcceptedTypes
 Public key type.
 
std::string _sshUser
 User name.
 
CallbackTimer _timer
 Timer object to handle async data requests.
 

Static Private Attributes

static constexpr size_t OUTPUT_PORT_INDEX_WIFI_OBS
 Flow (WiFiObs)
 

Additional Inherited Members

- Public Types inherited from NAV::Node
enum class  Mode : uint8_t {
  REAL_TIME ,
  POST_PROCESSING
}
 Different Modes the Node can work in. More...
 
enum class  State : uint8_t {
  Disabled ,
  Deinitialized ,
  DoInitialize ,
  Initializing ,
  Initialized ,
  DoDeinitialize ,
  Deinitializing ,
  DoShutdown ,
  Shutdown
}
 Possible states of the node. More...
 
- Data Fields inherited from NAV::Node
bool callbacksEnabled
 Enables the callbacks.
 
ax::NodeEditor::NodeId id
 Unique Id of the Node.
 
std::vector< InputPininputPins
 List of input pins.
 
Kind kind
 Kind of the Node.
 
std::string name
 Name of the Node.
 
std::vector< OutputPinoutputPins
 List of output pins.
 
std::multimap< InsTime, std::pair< OutputPin *, size_t > > pollEvents
 Map with callback events (sorted by time)
 
- Protected Attributes inherited from NAV::Node
ImVec2 _guiConfigDefaultWindowSize
 
bool _hasConfig
 Flag if the config window should be shown.
 
bool _lockConfigDuringRun
 Lock the config when executing post-processing.
 
bool _onlyRealTime
 Whether the node can run in post-processing or only real-time.
 

Detailed Description

Aruba Sensor Class.

Definition at line 25 of file ArubaSensor.hpp.

Constructor & Destructor Documentation

◆ ArubaSensor() [1/3]

NAV::ArubaSensor::ArubaSensor ( )

Default constructor.

Definition at line 23 of file ArubaSensor.cpp.

◆ ~ArubaSensor()

NAV::ArubaSensor::~ArubaSensor ( )
override

Destructor.

Definition at line 35 of file ArubaSensor.cpp.

◆ ArubaSensor() [2/3]

NAV::ArubaSensor::ArubaSensor ( const ArubaSensor & )
delete

Copy constructor.

◆ ArubaSensor() [3/3]

NAV::ArubaSensor::ArubaSensor ( ArubaSensor && )
delete

Move constructor.

Member Function Documentation

◆ category()

std::string NAV::ArubaSensor::category ( )
staticnodiscard

String representation of the Class Category.

Definition at line 50 of file ArubaSensor.cpp.

◆ deinitialize()

void NAV::ArubaSensor::deinitialize ( )
overrideprivatevirtual

Deinitialize the node.

Reimplemented from NAV::Node.

Definition at line 245 of file ArubaSensor.cpp.

◆ guiConfig()

void NAV::ArubaSensor::guiConfig ( )
overridevirtual

ImGui config window which is shown on double click.

Attention
Don't forget to set _hasConfig to true in the constructor of the node

Reimplemented from NAV::Node.

Definition at line 55 of file ArubaSensor.cpp.

◆ initialize()

bool NAV::ArubaSensor::initialize ( )
overrideprivatevirtual

Initialize the node.

Reimplemented from NAV::Node.

Definition at line 158 of file ArubaSensor.cpp.

◆ operator=() [1/2]

ArubaSensor & NAV::ArubaSensor::operator= ( ArubaSensor && )
delete

Move assignment operator.

◆ operator=() [2/2]

ArubaSensor & NAV::ArubaSensor::operator= ( const ArubaSensor & )
delete

Copy assignment operator.

◆ readSensorDataThread()

void NAV::ArubaSensor::readSensorDataThread ( void * userData)
staticprivate

Function which performs the async data reading.

Parameters
[in]userDataPointer to the object

Definition at line 265 of file ArubaSensor.cpp.

◆ resetNode()

bool NAV::ArubaSensor::resetNode ( )
overridevirtual

Resets the node. It is guaranteed that the node is initialized when this is called.

Reimplemented from NAV::Node.

Definition at line 153 of file ArubaSensor.cpp.

◆ restore()

void NAV::ArubaSensor::restore ( const json & j)
overridevirtual

Restores the node from a json object.

Parameters
[in]jJson object with the node state

Reimplemented from NAV::Node.

Definition at line 119 of file ArubaSensor.cpp.

◆ save()

json NAV::ArubaSensor::save ( ) const
nodiscardoverridevirtual

Saves the node into a json object.

Reimplemented from NAV::Node.

Definition at line 102 of file ArubaSensor.cpp.

◆ type()

std::string NAV::ArubaSensor::type ( ) const
nodiscardoverridevirtual

String representation of the Class Type.

Implements NAV::Node.

Definition at line 45 of file ArubaSensor.cpp.

◆ typeStatic()

std::string NAV::ArubaSensor::typeStatic ( )
staticnodiscard

String representation of the Class Type.

Definition at line 40 of file ArubaSensor.cpp.

Field Documentation

◆ _channel

ssh_channel NAV::ArubaSensor::_channel
private

SSH channel.

Definition at line 78 of file ArubaSensor.hpp.

◆ _outputInterval

int NAV::ArubaSensor::_outputInterval
private

Output interval in ms.

Definition at line 101 of file ArubaSensor.hpp.

◆ _session

ssh_session NAV::ArubaSensor::_session
private

SSH session.

Definition at line 80 of file ArubaSensor.hpp.

◆ _sshHost

std::string NAV::ArubaSensor::_sshHost
private

Ssh options.

Host address

Definition at line 88 of file ArubaSensor.hpp.

◆ _sshHostkeys

std::string NAV::ArubaSensor::_sshHostkeys
private

SSH encryption.

Definition at line 94 of file ArubaSensor.hpp.

◆ _sshKeyExchange

std::string NAV::ArubaSensor::_sshKeyExchange
private

Key exchange.

Definition at line 96 of file ArubaSensor.hpp.

◆ _sshPassword

std::string NAV::ArubaSensor::_sshPassword
private

User credentials.

Definition at line 92 of file ArubaSensor.hpp.

◆ _sshPublickeyAcceptedTypes

std::string NAV::ArubaSensor::_sshPublickeyAcceptedTypes
private

Public key type.

Definition at line 98 of file ArubaSensor.hpp.

◆ _sshUser

std::string NAV::ArubaSensor::_sshUser
private

User name.

Definition at line 90 of file ArubaSensor.hpp.

◆ _timer

CallbackTimer NAV::ArubaSensor::_timer
private

Timer object to handle async data requests.

Definition at line 83 of file ArubaSensor.hpp.

◆ OUTPUT_PORT_INDEX_WIFI_OBS

size_t NAV::ArubaSensor::OUTPUT_PORT_INDEX_WIFI_OBS
staticconstexprprivate

Flow (WiFiObs)

Definition at line 65 of file ArubaSensor.hpp.


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