Binding Process

At the start-up of a binding process, the consume status variable is set to the SNCP_KVB_ERR_NO_PRODUCER value and the consumer sends a
Request Connect
message to the producer. When the producer receives the
Request Connect
message, it validates the message, enters the consumer in a list, and sends a
Reply Connect
message if accepted. If no response is received within
Connect Timeout
milliseconds, the consumer sends another
Request Connect
message and this process continues until a
Reply Connect
message is received from the producer. During the connection process, the consume status variable value is set to the SNCP_KVB_ERR_BINDING_IN_PROCESS for the duration of the application cycle while sending the
Request Connect
message.
When the consumer receives the
Reply Connect
message, it also validates the message and may set the consume status variable value to SNCP_KVB_ERR_BAD_CRC if a mismatch exists between the producer and the consumer CRC. If the connection is accepted, the consume status variable is set to SNCP_KVB_ERR_BINDING_READY.
Following this connection process, the consumer sends a
Request Bindings
message to the producer at each application cycle. If the consumer receives a
Reply Binding
message with the requested data in less than
Max Age
milliseconds, the bound variables are updated. The consumer may sets its status variable value to SNCP_KVB_ERR_IMPOSSIBLE_TO_BIND if the data contains a heterogeneous link impossible to convert. If no response is received within
Bind Response Timeout
milliseconds, the consume status variable value is set to SNCP_KVB_ERR_NO_PRODUCER, then the consumer sends a
Disconnect
message to the producer and restarts the binding process. If the producer does not receive a
Request Bindings
message within
Bind Request Timeout
milliseconds, the consumer is removed from the producer’s list.
During an online change update, the following possibilities can occur:
  • The target is a producer or a consumer for the first time, the connection process is started and proceeds as during start-up.
  • The target was and remains a producer, the producer clears the list of connected consumers, loads new binding data, restarts the binding process and waits for a consumer to request a connection.
  • The target was and remains a consumer, the consumer sends a
    Disconnect
    message to the producer, loads new binding data and enters in a reconnection state. In the reconnection state, the consume status variable is set to the SNCP_KVB_ERR_UPD_IN_PROCESS value and the consumer sends a
    Request Connect
    message to the producer. If an update behavior default value is defined, the bound variable takes this value. The reconnection process following an online change is the same as the start-up connection process except CRC errors are ignored since the producer may not yet be updated. A reconnection attempt will also occur once every
    Connect Timeout
    time lapse.
  • If the re-connection is successfully completed within
    Update Timeout
    milliseconds, the consume status variable is set to the SNCP_KVB_ERR_BINDING_READY value and begins sending
    Request Bindings
    messages. The online change update is over and successful.
  • If the reconnection is not successfully completed within
    Update Timeout
    milliseconds, the consume status variable is set to the SNCP_KVB_ERR_UPD_TIMEOUT value and sends a
    Disconnect
    message to the producer, then restarts the process as during start-up. The online change update is over and has failed.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal