tte_tt_traffic.h

Go to the documentation of this file.
00001 /* -*- coding: iso-8859-1 -*-
00002  * Copyright (C) 2008 TTTech Computertechnik AG
00003  * ****************************************************************************
00004  * Name
00005  *    tte_tt_traffic.h
00006  *
00007  * Purpose
00008  *    TT traffic functions of the TTE protocol
00009  *
00010  * Revision Dates
00011  *   18-Jun-2008 Creation
00012  *   02-Dec-2008 (KSE) [29628] Changed include names
00013  *   03-May-2010 (JWO) [36059] Scheduled rx-actions shall receive until the
00014  *                       the first CT-frame arrives
00015  *--
00016  */
00017 
00018 #ifndef TTE_TT_TRAFFIC_H_
00019 #define TTE_TT_TRAFFIC_H_
00020 
00021 #include "tte_config.h"
00022 
00023 //#pragma pack(push)
00024 //#pragma pack(1)
00025 /* configuration of a TT sync message */
00026 typedef struct {
00027    eth_mac_addr_t  dst_mac;
00028    eth_mac_addr_t  src_mac;
00029    uint16_t        eth_type;
00030    uint32_t        integration_cycle;
00031    uint32_t        membership;
00032    uint32_t        sync_prio:8;
00033    uint32_t        sync_domain:8;
00034    uint32_t        pcf_type:4;
00035    uint32_t        reserved:12;
00036    uint32_t        reserved2;
00037    uint64_t        transparent_clock;
00038 } tte_sync_msg_t;
00039 //#pragma pack(pop)
00040 
00046 extern int32_t tte_rx_startupframe(tte_message_conf_t *sync_msg, hwtime_t *ts, uint64_t *tc_ns);
00047 
00049 extern int32_t tte_tt_sched_rx(uint32_t bg_max);
00050 
00052 extern int32_t tte_tt_sched_tx(tte_message_conf_t *tx_msg);
00053 
00058 extern int32_t tte_tx_syncframe(tte_message_conf_t * tx_msg, hwtime_t sched_ts);
00059 
00060 /* Create a PCF frame in the provided data buffer. The minimum size of the buffer is 60 bytes. */
00061 extern void tte_prepare_sync_frame(uint8_t *buf);
00062 
00063 #endif /* TTE_TT_TRAFFIC_H_ */
Generated on Tue Nov 29 14:09:18 2011 for TTEthernet Model for INET Framework by  doxygen 1.6.3