ApparatusFramework::CANOpenProtocol Class Reference
[Communication Services]

#include <CommunicationServices/current/include/CanOpen/CANOpenProtocol.h>

Inheritance diagram for ApparatusFramework::CANOpenProtocol:
ApparatusFramework::Protocol ApparatusFramework::SupervisedTask ApparatusFramework::Task

List of all members.

Public Member Functions

 CANOpenProtocol (const uint8 deviceNumber, const TaskId taskId, const TaskPriority priority, const StackSize stackSize, const uint16 msgQueueLgth, const char taskName[], const uint8 credit)
 ~CANOpenProtocol ()
void initialize ()
void startup ()
const ConnectiongetConnection (const char *address)
bool broadcast (ConnectionMsg *pCommMsg)
uint8 getDeviceNumber ()
void runBody ()

Detailed Description

This class is the protocol implementation for CanOpen. It inherits from the protocol class.

Definition at line 59 of file CANOpenProtocol.h.


Constructor & Destructor Documentation

ApparatusFramework::CANOpenProtocol::CANOpenProtocol ( const uint8  deviceNumber,
const TaskId  taskId,
const TaskPriority  priority,
const StackSize  stackSize,
const uint16  msgQueueLgth,
const char  taskName[],
const uint8  credit 
)

constructors, destructors Protocol custom construction. Each protocol is able to communicate using a char device. The name of this device is a construction parameter. As protocol is a task, the task parameters have to be provided.

Parameters:
deviceNumber CAN device number (also busId), CAN devices have standard names such as can0, can1, can2 etc. This number (starting with 0) directly represents this device.
taskId unique id of this protocols task.
priority priority of the task (the deeper the more important).
stackSize size of the stack of this task.
msgQueueLgth size of the message queue for inter task communication.
taskName should also be unique.
credit used for the task supervision.
ApparatusFramework::CANOpenProtocol::~CANOpenProtocol (  ) 

Destructs the CanOpenProtocol, closes and unregisters the connections.


Member Function Documentation

bool ApparatusFramework::CANOpenProtocol::broadcast ( ConnectionMsg pCommMsg  )  [virtual]

Broadcasts a message to all fetched connections.

Parameters:
pCommMsg Pointer to the communication message to be sent
Returns:
bool true SUCCESSFUL, false FAILURE.

Reimplemented from ApparatusFramework::Protocol.

const Connection* ApparatusFramework::CANOpenProtocol::getConnection ( const char *  address  )  [virtual]

protocol methods Returns a new connection using this protocol.

Parameters:
address a string that may be protocol specific and identifies the node to which the connection shall be built up.
Returns:
Connection* pointer to the connection. 0 if it did not work out.

Implements ApparatusFramework::Protocol.

uint8 ApparatusFramework::CANOpenProtocol::getDeviceNumber (  )  [inline]

The number of the device to be used for the CANOpen protocol communication.

Returns:
uint8 the device number.

Definition at line 106 of file CANOpenProtocol.h.

void ApparatusFramework::CANOpenProtocol::initialize (  )  [virtual]

factory startup Initializes the CANOpenProtocol accordingly to the factory startup pattern.

Reimplemented from ApparatusFramework::Protocol.

void ApparatusFramework::CANOpenProtocol::runBody (  )  [virtual]

Contains the main loop of the task. This block is executed by the kernel services.

Reimplemented from ApparatusFramework::Task.

void ApparatusFramework::CANOpenProtocol::startup (  )  [virtual]

Starts up the CANOpenProtocol accordingly to the factory startup pattern.

Reimplemented from ApparatusFramework::Protocol.

© 2004-2010 bbv Software Services AG / Apparatus Services