| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- typedef struct {
- const char * const _Protocol;
- int _Slave_ID; //remote id - use FF for broadcast
- int PortTypes; //0xFF = 1111 1111 s
- /*
- {
- bit 1 - PWM port
- bit 2 - on I2C managed port
- bit 3 - expanded port with LocalPort address
- bit 4 - not allocated
- bit 2 - not allocated
- bit 5 - not allocated
- bit 6 - not allocated
- bit 7 - not allocated
- bit 8 - not allocated
- }
- */
- // byte has_Address;
- int Address ;
- // byte has_Local_Port;
- int LocalPort;
- int Exp_state; /*0xFF = 1111 1111
- 0x00 = 0000 0000 = OFF = 0V
- 0x01 = 0000 0001 = ON = PWM max
- {
- bit 1 - OFF = 0V
- bit 2 - ON = PWM max
- bit 3 - not allocated
- bit 4 - not allocated
- bit 2 - not allocated
- bit 5 - not allocated
- bit 6 - not allocated
- bit 7 - not allocated
- bit 8 - not allocated
- }*/
- int Exp_state_ttl; // 0x00 = odswiezyc
- //int Broadcast_state; //0x00 - not broadcast; 0x01
- } _Slave_Port;
- struct _Slave_Ports_queue_tasksS {
- int queueID;
- int _Slave_Ports_queue_task_type ; /*
- { 0x01 _Slave_Ports_ttl_decrement,
- 0x02 request_confirm_Exp_state ,
- 0x03 request_set_new_Exp_state,
- 0x04
- }
- */
- int _Slave_Port_link; //todo link
- long time_seq_id;
- long time_min_run;
- } ;
- typedef struct _Slave_Ports_queue_tasksS _Slave_Ports_queue_tasksT;
- typedef int _Slave_ID_BROADCAST_T ;
- typedef int _SENDER_T ;
- //#define _Slave_ID_BROADCAST_T _Slave_ID_BROADCAST 0xFF ;
- #if ! defined(Active_ControllerID)
- #error "#9 not defined Active_ControllerID"
-
- #endif
- struct _Slave_Ports_Protocol_CAN_broadcast_S {
- const _Slave_ID_BROADCAST_T _Slave_ID_BROADCAST = 0xFF ; // 1remote id - use FF for broadcast
- const _SENDER_T _SENDER = Active_ControllerID ; //2 sender //Device which orginated port
- int Port_ID ; //3 global id for device //const char * const _Protocol;
- int PortTypes; //4 0xFF = 1111 1111 s
- //int Address ; //
- //int LocalPort; //
- int Exp_state; //5
- int Exp_state_ttl; //6
- int Broadcast_state; //7
- const int _CAN_8 = 0x07 ; //8 - nbot used
- } ;
- typedef struct _Slave_Ports_Protocol_CAN_broadcast_S _Slave_Ports_Protocol_CAN_broadcast_T;
- typedef int _CAN_SEND_1_T ; //1 byte = 0
- typedef int _CAN_SEND_2_T ; //2 byte = 8
- struct _Slave_Ports_Protocol_CAN_SEND_S {
- const _SENDER_T _SENDER = Active_ControllerID ;
- const _CAN_SEND_1_T _CAN_SEND_1 = 0 ;
- const _CAN_SEND_2_T _CAN_SEND_2 = 8 ;
- _Slave_Ports_Protocol_CAN_broadcast_T _Slave_Ports_Protocol_CAN_broadcast_A ;
- } ;
- //typedef byte _Slave_Ports_Protocol_CAN_broadcast_AS[8] ;
- /*
- struct _Slave_Ports_Protocol_CAN_broadcast_AS {
- const byte _Slave_ID_BROADCAST = 0xFF ; // 1remote id - use FF for broadcast
- const byte _SENDER = Active_ControllerID ; //2 sender //Device which orginated port
- byte Port_ID ; //3 global id for device //const char * const _Protocol;
- byte PortTypes; //4 0xFF = 1111 1111 s
- //int Address ; //
- //int LocalPort; //
- byte Exp_state; //5
- byte Exp_state_ttl; //6
- byte Broadcast_state; //7
- const byte _CAN_8 = 0x07 ; //8 - nbot used
- } ;
- */
- typedef byte _Slave_Ports_Protocol_CAN_broadcast_AS[8] ;
|