Service_pin_msg_send( ) function, Syntax, Example – Echelon Neuron C User Manual
Page 152: Service_pin_state( ) function
132
Functions
}
}
service_pin_msg_send( )
Function
The service_pin_msg_send( ) function attempts to send a service pin message. It
returns non-zero if it is successful (queued for transmission in the network
processor) and zero if not. This function is useful for automatic installation
scenarios. For example, a device can automatically transfer its service pin
message a random amount of time after powering up. This is also useful for
devices that do not have a physical service pin, but have some other method for
an installer to request a service pin message.
Syntax
#include
int service_pin_msg_send (void);
Example
#include
when ( ... )
{
...
service_pin_msg_send();
}
service_pin_state( )
Function
The service_pin_state( ) function allows an application program to read the
service pin state. A state of 0 or 1 is returned. A value of 1 indicates the service
pin is at logic zero. This function is useful for improving ease of installation and
maintenance. For example, an application can check for the service pin being
held low for three seconds following a reset, and then go unconfigured (for ease of
re-installation in a new network).
Syntax
#include
int service_pin_state (void);
Example
#include
stimer three_sec_timer;
when (reset)
{
if (service_pin_state()) three_sec_timer = 3;
}