CANBusInterface Struct Reference

An interface describing a virtual CANBus. More...

#include <CANBusInterface.hpp>

Inheritance diagram for CANBusInterface:
CANBus

List of all members.

Public Member Functions

virtual void setController (CANControllerInterface *c)=0
 Specify the controller for this bus.
virtual bool addDevice (CANDeviceInterface *dev)=0
 Register a CANDeviceInterface instance to the bus.
virtual void removeDevice (CANDeviceInterface *dev)=0
 Remove a CANDeviceInterface from the bus.
virtual bool addListener (CANListenerInterface *dev)=0
 Register a CANListenerInterface instance to the bus.
virtual void removeListener (CANListenerInterface *dev)=0
 Remove a CANListenerInterface from the bus.
virtual void write (const CANMessage *msg)=0
 Write a CANMessage to the bus.
virtual CANControllerInterfacegetController ()=0
 Get the controller for this bus.

Detailed Description

An interface describing a virtual CANBus.

Definition at line 43 of file CANBusInterface.hpp.


Member Function Documentation

virtual bool addDevice ( CANDeviceInterface dev  )  [pure virtual]

Register a CANDeviceInterface instance to the bus.

Parameters:
dev The device to be added to the bus.
Returns:
True if the operation succeeded, false otherwise.
Postcondition:
The device will receive all messages on the bus.

Implemented in CANBus.

Referenced by CANRequest::sendTo().

virtual bool addListener ( CANListenerInterface dev  )  [pure virtual]

Register a CANListenerInterface instance to the bus.

Parameters:
dev The listener to be added to the bus.
Returns:
True if the operation succeeded, false otherwise.
Postcondition:
The listener will receive all messages on the bus.

Implemented in CANBus.

virtual void removeDevice ( CANDeviceInterface dev  )  [pure virtual]

Remove a CANDeviceInterface from the bus.

Parameters:
dev The device to be removed from the bus.
Postcondition:
The device will no longer receive messages from the bus.
Invariant:
During a process(), the device may only remove itself.

Implemented in CANBus.

Referenced by CANRequest::abort().

virtual void removeListener ( CANListenerInterface dev  )  [pure virtual]

Remove a CANListenerInterface from the bus.

Parameters:
dev The listener to be removed from the bus.
Postcondition:
The listener will no longer receive messages from the bus.
Invariant:
During a process(), the listener may only remove itself.

Implemented in CANBus.

virtual void write ( const CANMessage msg  )  [pure virtual]

Write a CANMessage to the bus.

CANDevices can use this to put data on the CANBus. When this call returns, you are still the owner of msg.

Parameters:
msg A CANMessage which will be put on the bus.

Implemented in CANBus.

Referenced by SocketCANController::readFromBuffer(), CANPieController::receive(), and CANRequest::sendTo().


The documentation for this struct was generated from the following file:
Generated on Thu Dec 23 15:05:29 2010 for OrocosComponentLibrary by  doxygen 1.6.3