add three PLC test demo and readme
This commit is contained in:
@@ -57,6 +57,7 @@ typedef enum
|
||||
PROTOCOL_MELSEC_3C,
|
||||
PROTOCOL_FREEMODBUS_TCP_SERVER,
|
||||
PROTOCOL_CIP,
|
||||
PROTOCOL_ETHERCAT,
|
||||
PROTOCOL_END
|
||||
}ProtocolType;
|
||||
|
||||
@@ -116,6 +117,7 @@ int ControlProtocolIoctl(struct ControlProtocol *control_protocol, int cmd, void
|
||||
/*Control Framework new certain Protocol*/
|
||||
ControlProtocolType control_protocol;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -57,6 +57,10 @@ extern int FreeModbusTcpServerInit(struct ControlRecipe *p_recipe);
|
||||
extern int CipProtocolInit(struct ControlRecipe *p_recipe);
|
||||
#endif
|
||||
|
||||
#ifdef CONTROL_PROTOCOL_ETHERCAT
|
||||
extern int EthercatProtocolInit(struct ControlRecipe *p_recipe);
|
||||
#endif
|
||||
|
||||
/*
|
||||
CONTROL FRAMEWORK READ DATA FORMAT:
|
||||
| HEAD |device_id|read data length|read item count| data |
|
||||
@@ -103,6 +107,11 @@ static struct ControlProtocolInitParam protocol_init[] =
|
||||
#ifdef CONTROL_PROTOCOL_CIP
|
||||
{ PROTOCOL_CIP, CipProtocolInit },
|
||||
#endif
|
||||
|
||||
#ifdef CONTROL_PROTOCOL_ETHERCAT
|
||||
{ PROTOCOL_ETHERCAT, EthercatProtocolInit },
|
||||
#endif
|
||||
|
||||
{ PROTOCOL_END, NULL },
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user