- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# SCS::CanAeroBusConnector Class Reference

Handles CAN Aerospace message header and decodes node services. More...

`#include <canaerobusconnector.h>`

Inheritance diagram for SCS::CanAeroBusConnector:
[legend]

List of all members.

## Public Member Functions
| CanAeroBusConnector (CanAeroDataManager *manager, NetworkConnector< can_t > *connector, uint8_t own_node_id, uint8_t config_revision)
void | doHouseKeeping ()
uint8_t | ownNodeId () const
void | send (const can_t &msg)
void | send (const std::vector< can_t > &msg)
void | sendSTS (uint8_t node_id=BROADCAST_NODE_ID)
void | sendDRS (can_Id_t can_id, uint8_t node_id=BROADCAST_NODE_ID)
void | sendIDS (uint8_t node_id=BROADCAST_NODE_ID)
void | receiveMessage (const can_t &msg)
void | receiveMessage (const std::vector< can_t > &msg)
void | requestModule (uint8_t node_id, uint16_t module, uint16_t mode)
bool | isModuleActive (uint8_t node_id, uint16_t module)
bool | isClientActive (uint8_t node_id)

## Detailed Description

Handles CAN Aerospace message header and decodes node services.

For communicating with CAN Aerospace, various node services must be handled and some book keeping on connected clients must be done. This class handles all this.

Note:
  This class is reentrant and thread-safe.

Author:
  (c) 2009, 2010 by Philipp Münzel

Version:
  1.3

## Constructor & Destructor Documentation

SCS::CanAeroBusConnector::CanAeroBusConnector | ( | CanAeroDataManager * | manager,
|  | NetworkConnector< can_t > * | connector,
|  | uint8_t | own_node_id,
|  | uint8_t | config_revision
| ) |  |

Parameters:

  manager | instance handling incoming and outgoing data after protocol processing
  connector | the network-accessing instance
  own_node_id | your assigned node id or -1 for auto-configuration
  config_revision | minimum revision of SCS variables file required

## Member Function Documentation

void SCS::CanAeroBusConnector::doHouseKeeping | ( |  | ) |

Remove all clients from the list that were silent for more than ConnectedClient::time_out seconds.

bool SCS::CanAeroBusConnector::isClientActive | ( | uint8_t | node_id | ) |

Parameters:

  node_id | the client in question

Returns:
  whether the client has been actively transmitting data within the last 15 seconds

bool SCS::CanAeroBusConnector::isModuleActive | ( | uint8_t | node_id,
|  | uint16_t | module
| ) |  |

Parameters:

  node_id | the node that offers various modules
  module | the module to be queried

Returns:
  if a module is active on a node

uint8_t SCS::CanAeroBusConnector::ownNodeId | ( |  | ) | const

Returns:
  the node id assigned in the c'tor, or the automatically assigned id after calling the c'tor with auto-configuration

void SCS::CanAeroBusConnector::receiveMessage | ( | const can_t & | msg | ) | `[virtual]`

Processes service requests and responses, filters normal operation data.

Note:
  This function is thread-safe.

Parameters:

  msg | single packet received

Implements SCS::BusConnector< can_t >.

void SCS::CanAeroBusConnector::receiveMessage | ( | const std::vector< can_t > & | msg | ) | `[virtual]`

Processes service requests and responses, filters normal operation data.

Note:
  This function is thread-safe.

Parameters:

  msg | array of packets received

Implements SCS::BusConnector< can_t >.

void SCS::CanAeroBusConnector::requestModule | ( | uint8_t | node_id,
|  | uint16_t | module,
|  | uint16_t | mode
| ) |  |

request a module of a node to be en- or disabled.

void SCS::CanAeroBusConnector::send | ( | const std::vector< can_t > & | msg | ) | `[virtual]`

Parameters:

  msg | array of messages to send

Implements SCS::BusConnector< can_t >.

void SCS::CanAeroBusConnector::send | ( | const can_t & | msg | ) | `[virtual]`

Parameters:

  msg | single message to send

Implements SCS::BusConnector< can_t >.

void SCS::CanAeroBusConnector::sendDRS | ( | can_Id_t | can_id,
|  | uint8_t | node_id = `BROADCAST_NODE_ID`
| ) |  |

Send data request service

Parameters:

  request_id | the CAN id you want
  whether | identifier is 11 or 29 bit long
  node_id | addressed node, broadcast by default

void SCS::CanAeroBusConnector::sendIDS | ( | uint8_t | node_id = `BROADCAST_NODE_ID` | ) |

Send identification service request

Parameters:

  node_id | addressed node, broadcast by default

void SCS::CanAeroBusConnector::sendSTS | ( | uint8_t | node_id = `BROADCAST_NODE_ID` | ) |

Send state transmission service to a node

Parameters:

  node_id | addressed node, broadcast by default

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

- canaerobusconnector.h