Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

init.h File Reference

Functions for initialisation of the SlaveLib & CAN-interface. More...

#include <def.h>

Go to the source code of this file.

Data Structures

struct  td_s_sInitParameter

Defines

#define START_REMOTE_NODE   0x01
#define STOP_REMOTE_NODE   0x02
#define ENTER_PRE_OPERATIONAL_STATE   0x80
#define RESET_REMOTE_NODE   0x81
#define RESET_REMOTE_COMMUNICATION   0x82
#define OPERATIONAL   (BYTE)0x05
#define STOPPED   (BYTE)0x04
#define PRE_OPERATIONAL   (BYTE)0x7F
#define INITIALISATION_NODE   (BYTE)0x00
#define INITIALISATION_COMMUNICATION   (BYTE)0x10

Typedefs

typedef td_s_sInitParameter sInitParameter

Enumerations

enum  eBaudRate {
  b10kBit = 10, b20k = 20, b50k = 50, b100k = 100,
  b125k = 125, b250k = 250, b500k = 500, b800k = 800,
  b1M = 1000
}

Functions

BYTE initConnection (sInitParameter *initParameter)
void closeConnection (void)

Variables

BYTE bDeviceNodeId
BYTE bStateMachineState


Detailed Description

Functions for initialisation of the SlaveLib & CAN-interface.

Functions, vars and definitions which are canopen-lowlevel nature. such as init canopen, deinit canopen, ...


Define Documentation

#define ENTER_PRE_OPERATIONAL_STATE   0x80
 

change state machine state into: pre-operational

#define INITIALISATION_COMMUNICATION   (BYTE)0x10
 

state machine is in state: initialisation of the communication

#define INITIALISATION_NODE   (BYTE)0x00
 

state machine is in state: initialisation of the node

#define OPERATIONAL   (BYTE)0x05
 

state machine is in state: operational

#define PRE_OPERATIONAL   (BYTE)0x7F
 

state machine is in state: pre-operational

#define RESET_REMOTE_COMMUNICATION   0x82
 

change state machine state into: reset communication

#define RESET_REMOTE_NODE   0x81
 

change state machine state into: reset node

#define START_REMOTE_NODE   0x01
 

change state machine state into: operational

#define STOP_REMOTE_NODE   0x02
 

change state machine state into: stopped

#define STOPPED   (BYTE)0x04
 

state machine is in state: stopped


Typedef Documentation

typedef struct td_s_sInitParameter sInitParameter
 

This struct is used for initialising the CAN controller/interface. Therefore baudrate, node-id, processor- speed, irq and IO adress are needed (the latter two are only used for PC based can-controllers)


Enumeration Type Documentation

enum eBaudRate
 

eBaudRate is an enumeration which defines all possible baudrates. Of course more baudrates could be defined here, if neccessary

Enumeration values:
b10kBit 
b20k 
b50k 
b100k 
b125k 
b250k 
b500k 
b800k 
b1M 


Function Documentation

void closeConnection (  void    ) 
 

Closes connection to the CANbus. Probably only needed for PC based CAN cards

BYTE initConnection (  sInitParameter *    initParameter ) 
 

Sets the ID of this node, initializes CAN-interface (by calling t platform dependent setupCanInterface from canop.h.

Parameters:
initParameter  Struct that contains all relevant data for initialising the slavelib and the CAN-interface.


Variable Documentation

BYTE bDeviceNodeId
 

the node-id of this device

BYTE bStateMachineState
 

the actual state of this device: INITIALISATION, PRE_OPERATIONAL,OPERATIONAL or STOPPED


Generated on Wed Dec 25 01:04:57 2002 for CANopen SlaveLib by doxygen1.2.17