nico@207: nico@207: nico@207: CanFestival: /home/epimerde/documents/tc11/CanFestival-3/include/sync.h File Reference nico@207: nico@207: nico@207: nico@207: nico@207:
nico@207:
nico@207:
nico@207:
nico@207:

/home/epimerde/documents/tc11/CanFestival-3/include/sync.h File Reference

nico@207:

nico@207: Go to the source code of this file. nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:

Typedefs

typedef void(*) post_sync_t (void)
typedef void(*) post_TPDO_t (void)

Functions

void startSYNC (CO_Data *d)
void stopSYNC (CO_Data *d)
void _post_sync (void)
void _post_TPDO (void)
UNS8 sendSYNC (CO_Data *d, UNS32 cob_id)
UNS8 proceedSYNC (CO_Data *d, Message *m)
nico@207:


Typedef Documentation

nico@207: nico@207:
nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207:
typedef void(*) post_sync_t(void)
nico@207:
nico@207:
nico@207: nico@207:

nico@207: nico@207:

nico@207: Definition at line 30 of file sync.h. nico@207:

nico@207:

nico@207: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207:
typedef void(*) post_TPDO_t(void)
nico@207:
nico@207:
nico@207: nico@207:

nico@207: nico@207:

nico@207: Definition at line 33 of file sync.h. nico@207:

nico@207:

nico@207:


Function Documentation

nico@207: nico@207:
nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
void _post_sync (void   ) 
nico@207:
nico@207:
nico@207: nico@207:

nico@207: nico@207:

nico@207: Definition at line 245 of file sync.c. nico@207:

nico@207:

nico@207: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
void _post_TPDO (void   ) 
nico@207:
nico@207:
nico@207: nico@207:

nico@207: nico@207:

nico@207: Definition at line 246 of file sync.c. nico@207:

nico@207:

nico@207: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
UNS8 proceedSYNC (CO_Data d,
Message m 
)
nico@207:
nico@207:
nico@207: nico@207:

nico@207: This function is called when the node is receiving a SYNC message (cob-id = 0x80). What does the function : check if the node is in OERATIONAL mode. (other mode : return 0 but does nothing). Get the SYNC cobId by reading the dictionary index 1005. (Return -1 if it does not correspond to the cobId received). Scan the dictionary from index 0x1800 to the last PDO defined (dict_cstes.max_count_of_PDO_transmit) for each PDO whose transmission type is on synchro (transmission type < 241) and if the msg must be send at this SYNC. read the COBID. Verify that the nodeId inside the nodeId correspond to bDeviceNodeId. (Assume that the cobId of a PDO Transmit is made with the node id of the node who transmit), get the mapping, launch PDOmGR to send the PDO *m is a pointer to the message received bus_id is hardware dependant return 0 if OK, 0xFF if error nico@207:

nico@207: Definition at line 93 of file sync.c. nico@207:

nico@207: References td_indextable::bSubCount, CopyBits(), struct_s_process_var::count, struct_CO_Data::count_sync, struct_s_timer_entry::d, struct_s_process_var::data, struct_CO_Data::firstIndex, getODentry(), struct_CO_Data::lastIndex, MSG_ERR, MSG_WAR, struct_CO_Data::nodeState, struct_CO_Data::objdict, OD_SUCCESSFUL, Operational, s_quick_index::PDO_TRS, s_quick_index::PDO_TRS_MAP, PDOmGR(), td_subindex::pObject, struct_CO_Data::post_sync, struct_CO_Data::post_TPDO, struct_CO_Data::process_var, td_indextable::pSubindex, state10, state11, state3, state4, state5, state7, state8, state9, TRANS_SYNC_MAX, TRANS_SYNC_MIN, UNS16, UNS32, and UNS8. nico@207:

nico@207:

nico@207: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
UNS8 sendSYNC (CO_Data d,
UNS32  cob_id 
)
nico@207:
nico@207:
nico@207: nico@207:

nico@207: transmit a SYNC message on the bus number bus_id bus_id is hardware dependant return canSend(bus_id,&m) nico@207:

nico@207: Definition at line 77 of file sync.c. nico@207:

nico@207: References struct_CO_Data::canHandle, canSend(), Message::cob_id, struct_s_timer_entry::d, Message::len, MSG_WAR, NOT_A_REQUEST, proceedSYNC(), Message::rtr, UNS8, and SHORT_CAN::w. nico@207:

nico@207:

nico@207: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
void startSYNC (CO_Data d  ) 
nico@207:
nico@207:
nico@207: nico@207:

nico@207: nico@207:

nico@207: Definition at line 50 of file sync.c. nico@207:

nico@207: References struct_CO_Data::COB_ID_Sync, struct_s_timer_entry::d, OnCOB_ID_SyncUpdate(), RegisterSetODentryCallBack(), SetAlarm(), stopSYNC(), struct_CO_Data::Sync_Cycle_Period, SyncAlarm(), struct_CO_Data::syncTimer, and US_TO_TIMEVAL. nico@207:

nico@207:

nico@207: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
void stopSYNC (CO_Data d  ) 
nico@207:
nico@207:
nico@207: nico@207:

nico@207: nico@207:

nico@207: Definition at line 71 of file sync.c. nico@207:

nico@207: References struct_s_timer_entry::d, DelAlarm(), and struct_CO_Data::syncTimer. nico@207:

nico@207:

nico@207:


Generated on Mon Jun 4 16:29:07 2007 for CanFestival by  nico@207: nico@207: doxygen 1.5.1
nico@207: nico@207: