2
019-
03
58
Communicating with the OIT System
Library Functions
bool Connect(string ip,int port)
ip
: IP of the connected sensor
port
: Port of the connected sensor
Response:
False if the connection could not be created, otherwise true
Opens a connection to a sensor with the IP and port specified.
void Disconnect()
Disconnects the open connection
bool Connected {get;}
Response:
Returns the connection status
void SaveSensorSettings()
Saves the current parameter set in the sensor's memory.
After a confirmation has been received from the sensor, a
SaveDataOnSensorReceived
event is triggered.
void LoadSensorSettings()
Requests a parameter set saved with
SaveSensorSettings
from the sensor.
After a parameter set has been received from the sensor, a
ParameterDataReceived
event with
modifier = LOAD_Data
is triggered.
The data can then be retrieved via the
GetSingleParameter
method.
void GetNetworkSettings()
Requests the sensor's current connection settings from the sensor.
After this data has been received from the sensor, a GetNetworkReceived event is
triggered. This provides the current IP address, network mask, and gateway for the
sensor.
void GetLogMessages(bool on)
on
: Switches log messages on
off
: Switches log messages off
Defines whether or not the sensor sends log messages. If log messages are
switched on, a
LogDataReceived
event is triggered each time a log message is
received from the sensor.
void GetAllParametersFromSensor()
Requests the current parameter set from the sensor. After a parameter set has been
received from the sensor, a
ParameterDataReceived
event with
modifier =
None
is triggered. This indicates that the internal list has been updated with the
parameter set. Individual parameters can then be retrieved via
GetSingleParameter.
abgefragt werden.
public bool ExistsParameter(string configId, string parameterId)
Used to query whether a particular parameter exists on the sensor
configId
: Configuration ID of a parameter
parameterId
: Parameter ID of a parameter
Response:
True or false, depending on whether the parameter exists
string GetSpecificSingleParameter(ushort version, string configId,
string parameterId)
configId
: Configuration ID of a parameter
parameterId
: Parameter ID of a parameter
Response:
The current value of the specified parameter
Retrieves the current value for a parameter from the sensor; details of the version,
configId, and parameterId can be taken from the accompanying table. Returns the
value of the parameter, or an empty string if the value was not retrieved.
void SetSpecificSingleParameter(ushort version, string configId,
string parameterId, string newValue)