Bladeren bron

add documentation for cip service function pointer typedef

Alois Zoitl 13 jaren geleden
bovenliggende
commit
9b30887ec5
2 gewijzigde bestanden met toevoegingen van 12 en 0 verwijderingen
  1. 11 0
      src/cip/ciptypes.h
  2. 1 0
      src/opener_api.h

+ 11 - 0
src/cip/ciptypes.h

@@ -199,10 +199,21 @@ typedef struct CIP_Class
   char *acName; /*!> class name */
   char *acName; /*!> class name */
 } S_CIP_Class;
 } S_CIP_Class;
 
 
+/*! \ingroup CIP_API
+ *  \typedef  EIP_STATUS (*TCIPServiceFunc)(S_CIP_Instance *pa_pstInstance, S_CIP_MR_Request *pa_MRRequest, S_CIP_MR_Response *pa_MRResponse)
+ *  \brief Signature definition for the implementation of CIP services.
+ *
+ *  CIP services have to follow this signature in order to be handled correctly by the stack.
+ *  @param pa_pstInstance the instance which was referenced in the service request
+ *  @param pa_MRRequest request data
+ *  @param pa_MRResponse storage for the response data, including a buffer for extended data
+ *  @return EIP_OK_SEND if service could be executed successfully and a response should be sent
+ */
 typedef EIP_STATUS
 typedef EIP_STATUS
 (*TCIPServiceFunc)(S_CIP_Instance *pa_pstInstance,
 (*TCIPServiceFunc)(S_CIP_Instance *pa_pstInstance,
     S_CIP_MR_Request *pa_MRRequest, S_CIP_MR_Response *pa_MRResponse);
     S_CIP_MR_Request *pa_MRRequest, S_CIP_MR_Response *pa_MRResponse);
 
 
+
 /* service descriptor. These are stored in an array*/
 /* service descriptor. These are stored in an array*/
 typedef struct CIP_service_struct
 typedef struct CIP_service_struct
 {
 {

+ 1 - 0
src/opener_api.h

@@ -15,6 +15,7 @@
  * \brief This is the public interface of the OpENer. It provides all function needed to implement an EtherNet/IP enabled slave-device.
  * \brief This is the public interface of the OpENer. It provides all function needed to implement an EtherNet/IP enabled slave-device.
  */
  */
 
 
+
 /*! \ingroup CIP_API
 /*! \ingroup CIP_API
  * \brief Configure the data of the network interface of the device
  * \brief Configure the data of the network interface of the device
  * 
  *