APIs, concepts, guides, and more
|
|
static |
controller | Pointer to the MotionController to shut down the network on. |
Exception | Thrown if the network does not reach the SHUTDOWN or UNINITIALIZED state. {
// Check if the network is already shutdown
controller.NetworkStateGet() == RSINetworkState.RSINetworkStateSHUTDOWN)
{
return;
}
// Shutdown the network
Console.WriteLine("Shutting down the network..");
controller.NetworkShutdown();
controller.NetworkStateGet() != RSINetworkState.RSINetworkStateSHUTDOWN) // Check if the network is shutdown.
{
int messagesToRead = controller.NetworkLogMessageCountGet(); // Some kind of error shutting down 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 SHUTDOWN state but the network did not get there.");
}
else // Else, of network is shutdown.
{
Console.WriteLine("Network Shutdown");
}
}
|
Definition at line 96 of file HelperFunctionsCS.cs.