APIs, concepts, guides, and more
|
|
static |
controller | Pointer to the MotionController to start the network on. |
Exception | Thrown if the network does not reach the OPERATIONAL state. {
// Initialize the Network
if (controller.NetworkStateGet() != RSINetworkState.RSINetworkStateOPERATIONAL) // Check if network is started already.
{
Console.WriteLine("Starting Network..");
controller.NetworkStart(); // If not. Initialize The Network. (This can also be done from RapidSetup Tool)
}
if (controller.NetworkStateGet() != RSINetworkState.RSINetworkStateOPERATIONAL) // Check if network is started again.
{
int messagesToRead = controller.NetworkLogMessageCountGet(); // Some kind of error starting the network, read the network log messages
for (int i = 0; i < messagesToRead; i++)
{
Console.WriteLine(controller.NetworkLogMessageGet(i)); // Print all the messages to help figure out the problem
}
throw new SystemException("Expected OPERATIONAL state but the network did not get there.");
}
else // Else, of network is operational.
{
Console.WriteLine("Network Started");
}
}
|
Definition at line 61 of file HelperFunctionsCS.cs.