CARMA C++
carma::canbus::canoverip::Session Class Reference

Class to encompass a CAN over IP session. More...

#include <carma/canbus/Session.h>

Classes

struct  FilterType
 CAN Message filter type. More...
 

Public Member Functions

void addFilter (FilterType filter)
 Add a filter to this Session. More...
 
void clearFilters ()
 Clear existing filters. More...
 
int getReadSock ()
 Get read sock. More...
 
int getWriteSock ()
 Get write sock. More...
 
bool matchesFilter (const carma::canbus::Message &msg)
 Check to see if a CAN Message Id matches a filter for this Session. More...
 
 Session (int readSock, int writeSock)
 Constructor. More...
 
 ~Session ()
 Destructor. More...
 

Detailed Description

Class to encompass a CAN over IP session.

Not intended or safe for use by anybody except the canOverIpServer!

Definition at line 38 of file Session.h.

Constructor & Destructor Documentation

carma::canbus::canoverip::Session::Session ( int  readSock,
int  writeSock 
)

Constructor.

Parameters
readSockSocket descriptor for this Connection/Session
writeSockSocket descriptor for this Connection/Session
carma::canbus::canoverip::Session::~Session ( )

Destructor.

Member Function Documentation

void carma::canbus::canoverip::Session::addFilter ( FilterType  filter)

Add a filter to this Session.

void carma::canbus::canoverip::Session::clearFilters ( )

Clear existing filters.

int carma::canbus::canoverip::Session::getReadSock ( )

Get read sock.

Returns
readsock

Definition at line 81 of file Session.h.

int carma::canbus::canoverip::Session::getWriteSock ( )

Get write sock.

Returns
write sock.

Definition at line 87 of file Session.h.

bool carma::canbus::canoverip::Session::matchesFilter ( const carma::canbus::Message msg)

Check to see if a CAN Message Id matches a filter for this Session.


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