Subroutine Guidelines

Required subroutines.

Optional subroutines.

Subroutines that must be customized.

Read and write request note.

Required Subroutines

You must design the following subroutines irrespective of the supported options:

user_device_info()

user_protocol_info()

Optional Subroutines

Below is a list of subroutines that are optional regardless of implemented functions. These functions may be called within the enabler, but the templates for these subroutines should suffice when no customization is required.

user_init()

user_on_demand_response()

user_open_port()

user_proc_event_1()

user_proc_event_2()

user_proc_event_3()

user_proc_event_4()

user_proc_event_5()

user_proc_event_6()

user_proc_event_7()

user_proc_event_8()

user_proc_event_9()

user_proc_event_10()

user_term()

Subroutines That Must Be Customized

Below is a list of subroutines that must be customized based on the list of supported features:

For

Subroutine

Custom addressing

user_valid_point()

Model verification

user_cpu_model()

Reading device data

user_read_data()

Writing device data

user_write_data()

Writing point quality data

user_write_point_quality()

Receiving unsolicited data

user_accept_unsolicited_data()

user_process_unsolicited_data()

user_process_unsolicited_data_stamp()

Device status

user_device_okay()

Reading diagnostic data

user_valid_diag_point()

user_read_diag_data()

Host redundancy

user_heartbeat_device()

Read and Write Requests Note

Read and Write requests to devices are often grouped to improve efficiency. A grouped request fails if any point in the group is invalid. For this reason, it is strongly recommended that regardless of addressing-mode, you should use user_valid_point() to verify that data at the configured memory location is readable if read requests are supported.

More information

User customizable functions.