Functions | Variables
cp1616::pnio_device_callbacks Namespace Reference

Functions

void apduStatusIndication (PNIO_UINT32 dev_handle, PNIO_UINT16 ar_number, PNIO_UINT16 session_key, PNIO_APDU_STATUS_IND apdu_status)
 This callback is called after the state of the Controller has changed.
void arAbortIndication (PNIO_UINT32 dev_handle, PNIO_UINT16 ar_number, PNIO_UINT16 session_key, PNIO_AR_REASON reason_code)
 This callback is called by the IO Base Device interface as soon as the connection is terminated after a data exchange with the IO Controller began.
void arCheckIndication (PNIO_UINT32 dev_handle, PNIO_UINT32 host_ip, PNIO_UINT16 ar_type, PNIO_UUID_TYPE ar_uuid, PNIO_UINT32 ar_properties, PNIO_UUID_TYPE cmi_obj_uuid, PNIO_UINT16 cmi_station_name_length, PNIO_UINT8 *p_cmi_station_name, PNIO_AR_TYPE *p_ar)
 This callback is called by the IO Base Device interface as soon as an IO controller establishes a connection with the IO Base Device user programm and transmits its expected configuration for the IO Base Device user program. As a result of this callback, application-relation global parameters are transferred to the IO Base user program for inspection. In case of errors in the application-relation layout, the IO Base Device user program can terminate the application-retional global parameters.
void arIndataIndication (PNIO_UINT32 dev_handle, PNIO_UINT16 ar_number, PNIO_UINT16 session_key)
 This callback is called by the IO Base Device interface as soon as an IO controller has transmitted the IO data for the first time. It signals the beginning of cyclical data exchange.
void arInfoIndication (PNIO_UINT32 dev_handle, PNIO_UINT16 ar_number, PNIO_UINT16 session_key, PNIO_AR_TYPE *p_ar)
 This callback is called by the IO Base Device interface as soon as the application-relation for the IO controller is laid out. Consequently, the IO-Base-Device user program is informed about the modules and submodules that will be operated in this application relation.. In this callback function user can initialize IO data in submodule to initial value 0 and can also set local consumer and provider status.
void arOfflineIndication (PNIO_UINT32 dev_handle, PNIO_UINT16 ar_number, PNIO_UINT16 session_key, PNIO_AR_REASON reason_code)
 This callback is called by the IO Base Device interface as soon as the connection is terminated before a data exchange with the IO Controller began.
void checkIndication (PNIO_UINT32 dev_handle, PNIO_UINT32 api, PNIO_UINT16 ar_number, PNIO_UINT16 session_key, PNIO_DEV_ADDR *p_addr, PNIO_UINT32 *p_mod_ident, PNIO_UINT16 *p_mod_state, PNIO_UINT32 *p_sub_ident, PNIO_UINT16 *p_sub_state)
 This callback is called for each and every submodule of the IO Base Device interface for which the configuration does not match that of the IO controller. The user program is consequently given the option of changing the submodule layout or marking the submodule as compatible or incorrect. In case of agreement of the configurations, this callback is not called.
void cpStopRequest (PNIO_UINT32 dev_handle)
 This callback is called by the IO Base Device interface, as soon as an IO controller recieves stop request from PNIO_device_stop function.
PNIO_IOXS dataRead (PNIO_UINT32 dev_handle, PNIO_DEV_ADDR *p_addr, PNIO_UINT32 buffer_length, PNIO_UINT8 *p_buffer, PNIO_IOXS io_provider_status)
 Passes the output data from stack to the application.
PNIO_IOXS dataWrite (PNIO_UINT32 dev_handle, PNIO_DEV_ADDR *p_addr, PNIO_UINT32 buffer_length, PNIO_UINT8 *p_buffer, PNIO_IOXS io_consumer_status)
 Passes the input data from the application to the stack.
void deviceStopped (PNIO_UINT32 dev_handle, PNIO_UINT32 reserved)
 This callback is called by the IO Base Device interface after the device is stopped.
void prmEndIndication (PNIO_UINT32 dev_handle, PNIO_UINT16 ar_number, PNIO_UINT16 session_key, PNIO_UINT32 api, PNIO_UINT16 slot_number, PNIO_UINT16 subslot_number)
 This callback is called by the IO Base Device interface, as soon as an IO controller signals the end of the parametrizing phase.
void recordRead (PNIO_UINT32 dev_handle, PNIO_UINT32 api, PNIO_UINT16 ar_number, PNIO_UINT16 sessi, PNIO_UINT32 sequence_number, PNIO_DEV_ADDR *p_addr, PNIO_UINT32 record_index, PNIO_UINT32 *p_buffer_length, PNIO_UINT8 *p_buffer, PNIO_ERR_STAT *p_pnio_state)
 Passes the output data from stack to the application.
void recordWrite (PNIO_UINT32 dev_handle, PNIO_UINT32 api, PNIO_UINT16 ar_number, PNIO_UINT16 sessi, PNIO_UINT32 sequence_number, PNIO_DEV_ADDR *p_addr, PNIO_UINT32 record_index, PNIO_UINT32 *p_buffer_length, PNIO_UINT8 *p_buffer, PNIO_ERR_STAT *p_pnio_state)
 This callback is called to notify that a write record request has been received from the PNIO controller.
void requestDone (PNIO_UINT32 dev_handle, PNIO_UINT32 user_handle, PNIO_UINT32 status, PNIO_ERR_STAT *p_pnio_state)
 This callback is called by the IO Base Device interface, as soon as an alarm is sent.

Variables

static const int MAX_AR_INFO_COUNT = 500
 max counter value for prm_ar_info_ind() callback

Function Documentation

void cp1616::pnio_device_callbacks::apduStatusIndication ( PNIO_UINT32  dev_handle,
PNIO_UINT16  ar_number,
PNIO_UINT16  session_key,
PNIO_APDU_STATUS_IND  apdu_status 
)

This callback is called after the state of the Controller has changed.

Parameters:
[in]dev_handledevice handle
[in]ar_numberapplication-relation number
[in]session_keysession key
apdu_status

Definition at line 457 of file cp1616_io_device_callbacks.cpp.

void cp1616::pnio_device_callbacks::arAbortIndication ( PNIO_UINT32  dev_handle,
PNIO_UINT16  ar_number,
PNIO_UINT16  session_key,
PNIO_AR_REASON  reason_code 
)

This callback is called by the IO Base Device interface as soon as the connection is terminated after a data exchange with the IO Controller began.

Parameters:
[in]dev_handledevice handle
[in]ar_numberapplication-relation number
[in]session_keysession key
[in]*p_arpointer to application-relation structure PNIO_AR_TYPE
[in]reason_codereason code

Definition at line 382 of file cp1616_io_device_callbacks.cpp.

void cp1616::pnio_device_callbacks::arCheckIndication ( PNIO_UINT32  dev_handle,
PNIO_UINT32  host_ip,
PNIO_UINT16  ar_type,
PNIO_UUID_TYPE  ar_uuid,
PNIO_UINT32  ar_properties,
PNIO_UUID_TYPE  cmi_obj_uuid,
PNIO_UINT16  cmi_station_name_length,
PNIO_UINT8 *  p_cmi_station_name,
PNIO_AR_TYPE *  p_ar 
)

This callback is called by the IO Base Device interface as soon as an IO controller establishes a connection with the IO Base Device user programm and transmits its expected configuration for the IO Base Device user program. As a result of this callback, application-relation global parameters are transferred to the IO Base user program for inspection. In case of errors in the application-relation layout, the IO Base Device user program can terminate the application-retional global parameters.

Parameters:
[in]dev_handledevice handle
[in]apiapi number
[in]host_ipIP address of the host IO Controller
[in]ar_typeapplication-relation type
[in]ar_uuidapplication-relation UUID
[in]ar_propertiesapplication-relation properties
[in]cmi_obj_uuidUUID of application-relation initiator e.g IO controller
[in]cmi_station_name_lengthlength of param station-name
[in]*p_cmi_station_namestation name
[in]*p_arpointer to application-relation structure PNIO_AR_TYPE

Definition at line 291 of file cp1616_io_device_callbacks.cpp.

void cp1616::pnio_device_callbacks::arIndataIndication ( PNIO_UINT32  dev_handle,
PNIO_UINT16  ar_number,
PNIO_UINT16  session_key 
)

This callback is called by the IO Base Device interface as soon as an IO controller has transmitted the IO data for the first time. It signals the beginning of cyclical data exchange.

Parameters:
[in]dev_handledevice handle
[in]ar_numberapplication-relation number
[in]session_keysession key
[in]*p_arpointer to application-relation structure PNIO_AR_TYPE

Definition at line 371 of file cp1616_io_device_callbacks.cpp.

void cp1616::pnio_device_callbacks::arInfoIndication ( PNIO_UINT32  dev_handle,
PNIO_UINT16  ar_number,
PNIO_UINT16  session_key,
PNIO_AR_TYPE *  p_ar 
)

This callback is called by the IO Base Device interface as soon as the application-relation for the IO controller is laid out. Consequently, the IO-Base-Device user program is informed about the modules and submodules that will be operated in this application relation.. In this callback function user can initialize IO data in submodule to initial value 0 and can also set local consumer and provider status.

Parameters:
[in]dev_handledevice handle
[in]ar_numberapplication-relation number
[in]session_keysession key
[in]*p_arpointer to application-relation structure PNIO_AR_TYPE

Definition at line 316 of file cp1616_io_device_callbacks.cpp.

void cp1616::pnio_device_callbacks::arOfflineIndication ( PNIO_UINT32  dev_handle,
PNIO_UINT16  ar_number,
PNIO_UINT16  session_key,
PNIO_AR_REASON  reason_code 
)

This callback is called by the IO Base Device interface as soon as the connection is terminated before a data exchange with the IO Controller began.

Parameters:
[in]dev_handledevice handle
[in]ar_numberapplication-relation number
[in]session_keysession key
[in]*p_arpointer to application-relation structure PNIO_AR_TYPE
[in]reason_codereason code

Definition at line 392 of file cp1616_io_device_callbacks.cpp.

void cp1616::pnio_device_callbacks::checkIndication ( PNIO_UINT32  dev_handle,
PNIO_UINT32  api,
PNIO_UINT16  ar_number,
PNIO_UINT16  session_key,
PNIO_DEV_ADDR *  p_addr,
PNIO_UINT32 *  p_mod_ident,
PNIO_UINT16 *  p_mod_state,
PNIO_UINT32 *  p_sub_ident,
PNIO_UINT16 *  p_sub_state 
)

This callback is called for each and every submodule of the IO Base Device interface for which the configuration does not match that of the IO controller. The user program is consequently given the option of changing the submodule layout or marking the submodule as compatible or incorrect. In case of agreement of the configurations, this callback is not called.

Parameters:
[in]dev_handledevice handle
[in]apiapi number
[in]ar_numberapplication relation number
[in]sessisession-key
[in]*p_addrgeographical address
[out]*p_mod_identpointer to the module identifier
[out]*p_mod_statepointer to the module state
[out]*p_sub_identpointer to submodule identifier
[out]*p_sub_statepointer to submodule state

Definition at line 251 of file cp1616_io_device_callbacks.cpp.

void cp1616::pnio_device_callbacks::cpStopRequest ( PNIO_UINT32  dev_handle)

This callback is called by the IO Base Device interface, as soon as an IO controller recieves stop request from PNIO_device_stop function.

Parameters:
[in]dev_handledevice handle

Definition at line 435 of file cp1616_io_device_callbacks.cpp.

PNIO_IOXS cp1616::pnio_device_callbacks::dataRead ( PNIO_UINT32  dev_handle,
PNIO_DEV_ADDR *  p_addr,
PNIO_UINT32  buffer_length,
PNIO_UINT8 *  p_buffer,
PNIO_IOXS  io_provider_status 
)

Passes the output data from stack to the application.

Parameters:
[in]dev_handledevice handle
[in]*p_addrgeographical address
[in]buffer_lengthlength of the submodule input data
[in]*p_bufferpointer to data buffer to read from
[in]io_provider_statusremote (io controller) provider status

Definition at line 31 of file cp1616_io_device_callbacks.cpp.

PNIO_IOXS cp1616::pnio_device_callbacks::dataWrite ( PNIO_UINT32  dev_handle,
PNIO_DEV_ADDR *  p_addr,
PNIO_UINT32  buffer_length,
PNIO_UINT8 *  p_buffer,
PNIO_IOXS  io_consumer_status 
)

Passes the input data from the application to the stack.

Parameters:
[in]dev_handledevice handle
[in]*p_addrgeographical address
[in]buffer_lengthlength of the submodule input data
[out]*p_bufferpointer to data buffer to write to
[in]io_consumer_statusremote (io controller) consumer status

Definition at line 83 of file cp1616_io_device_callbacks.cpp.

void cp1616::pnio_device_callbacks::deviceStopped ( PNIO_UINT32  dev_handle,
PNIO_UINT32  reserved 
)

This callback is called by the IO Base Device interface after the device is stopped.

Parameters:
[in]dev_handledevice handle

Definition at line 441 of file cp1616_io_device_callbacks.cpp.

void cp1616::pnio_device_callbacks::prmEndIndication ( PNIO_UINT32  dev_handle,
PNIO_UINT16  ar_number,
PNIO_UINT16  session_key,
PNIO_UINT32  api,
PNIO_UINT16  slot_number,
PNIO_UINT16  subslot_number 
)

This callback is called by the IO Base Device interface, as soon as an IO controller signals the end of the parametrizing phase.

Parameters:
[in]dev_handledevice handle
[in]ar_numberapplication-relation number
[in]session_keysession key
[in]apiassociated API
[in]slot_numberslot number
[in]subslot_numbersubslot number

Definition at line 405 of file cp1616_io_device_callbacks.cpp.

void cp1616::pnio_device_callbacks::recordRead ( PNIO_UINT32  dev_handle,
PNIO_UINT32  api,
PNIO_UINT16  ar_number,
PNIO_UINT16  sessi,
PNIO_UINT32  sequence_number,
PNIO_DEV_ADDR *  p_addr,
PNIO_UINT32  record_index,
PNIO_UINT32 *  p_buffer_length,
PNIO_UINT8 *  p_buffer,
PNIO_ERR_STAT *  p_pnio_state 
)

Passes the output data from stack to the application.

Parameters:
[in]dev_handledevice handle
[in]apiqpi number
[in]ar_numberapplication relation number
[in]sessisession-key
[in]sequence_numbersequence number
[in]*p_addrgeographical address
[in]record_indexrecord index
[in]*p_buffer_lengthpointer to buffer length
[in]buffer_lengthlength of the submodule input data
[in]*p_bufferpointer to data buffer to read from
[in]*p_pnio_state4 byte PNIOStatus (ErrCode, ErrDecode, ErrCode1, ErrCode2), see IEC61158-6

Definition at line 193 of file cp1616_io_device_callbacks.cpp.

void cp1616::pnio_device_callbacks::recordWrite ( PNIO_UINT32  dev_handle,
PNIO_UINT32  api,
PNIO_UINT16  ar_number,
PNIO_UINT16  sessi,
PNIO_UINT32  sequence_number,
PNIO_DEV_ADDR *  p_addr,
PNIO_UINT32  record_index,
PNIO_UINT32 *  p_buffer_length,
PNIO_UINT8 *  p_buffer,
PNIO_ERR_STAT *  p_pnio_state 
)

This callback is called to notify that a write record request has been received from the PNIO controller.

Parameters:
[in]dev_handledevice handle
[in]apiapi number
[in]ar_numberapplication relation number
[in]sessisession-key
[in]sequence_numbersequence number
[in]*p_addrgeographical address
[in]record_indexrecord index
[in/out]*p_buffer_length pointer to buffer length
[in]buffer_lengthlength of the submodule input data
[in]*p_bufferpointer to data buffer to read from
[in]*p_pnio_state4 byte PNIOStatus (ErrCode, ErrDecode, ErrCode1, ErrCode2), see IEC61158-6

Definition at line 134 of file cp1616_io_device_callbacks.cpp.

void cp1616::pnio_device_callbacks::requestDone ( PNIO_UINT32  dev_handle,
PNIO_UINT32  user_handle,
PNIO_UINT32  status,
PNIO_ERR_STAT *  p_pnio_state 
)

This callback is called by the IO Base Device interface, as soon as an alarm is sent.

Parameters:
[in]dev_handledevice handle
[in]user_handleuser definned handle
status
[out]*p_pnio_statepointer to submodule state

Definition at line 448 of file cp1616_io_device_callbacks.cpp.


Variable Documentation

max counter value for prm_ar_info_ind() callback

Definition at line 307 of file cp1616_io_device_callbacks.h.



cp1616
Author(s):
autogenerated on Fri Aug 28 2015 13:08:36