CARMA C++
|
#include <carma/canbus/InetCan.h>
Public Member Functions | |
void | addFilter (unsigned int ac, unsigned int am, unsigned short busac) |
Add an additional acceptance filter. More... | |
void | clearFilters () |
Clear all acceptance filters. More... | |
carma::canbus::Message | getMessage () |
Get a CAN Message. More... | |
InetCan (const std::string hostname, unsigned int ac=0xffffffff, unsigned int am=0xffffffff, unsigned short busac=0xffff) | |
Constructor. More... | |
void | postMessage (const carma::canbus::Message &msg, carma::canbus::txPriorityType prio=carma::canbus::NORMAL) |
Post a CAN Message. More... | |
~InetCan () | |
Destructor. More... | |
![]() | |
virtual void | clearReadQueue () |
Clear any underlying read buffers. More... | |
virtual void | echoAll (bool enable) |
Enable or disable echoing sent messages back through the read interface. More... | |
virtual BusStatusMap | getBusStatus () const |
Retrieve bus statistics. More... | |
virtual void | queueMessage (const Message &msg) |
Queue CAN message to be read for simulation purposes. More... | |
virtual void | setTimestampEchoLatency (int tsLatency, busIdType busId) |
Set timestamp echo latency. More... | |
virtual | ~CanIo () |
Virtual destructor. More... | |
carma::canbus::InetCan::InetCan | ( | const std::string | hostname, |
unsigned int | ac = 0xffffffff , |
||
unsigned int | am = 0xffffffff , |
||
unsigned short | busac = 0xffff |
||
) |
Constructor.
Establish a client session with a CanOverIp server. By default, the acceptance filter is set so that ALL messages are sent over the connection. Keep in mind that this may be a very large number of messages. Also keep in mind that the CanOverIp server ignores certain critical messages such as time stamps and resets.
hostname | Hostname of machine running CanOverIp server. |
ac | Can message filter acceptance code (default all). |
am | Can message filter acceptance mask (default all). |
busac | Can bus filter acceptance code (default ALL_BUSSES). |
carma::canbus::InetCan::~InetCan | ( | ) |
Destructor.
void carma::canbus::InetCan::addFilter | ( | unsigned int | ac, |
unsigned int | am, | ||
unsigned short | busac | ||
) |
Add an additional acceptance filter.
ac | Can message filter acceptance code. |
am | Can message filter acceptance mask. |
busac | Can Bus filter acceptance code. |
void carma::canbus::InetCan::clearFilters | ( | ) |
Clear all acceptance filters.
After this method is called, no messages will be received.
|
virtual |
Get a CAN Message.
This method blocks until a message is received.
Implements carma::canbus::CanIo.
|
virtual |
Post a CAN Message.
msg | canbus::Message to post. |
prio | Message priority - has no effect for InetCan! |
Implements carma::canbus::CanOutput.