using System;
using static MAXT.MXFoundation.mxf;
using System.Text;
namespace discrete_example
{
class discrete_Multi
{
static void Main(string[] args)
{
UInt32 rc;
UInt64 moduleCount = 0;
UInt64 channelCount = 0;
UInt64 server;
UInt64 device = 0;
var module = new UInt64[1];
var rx = new UInt64[1];
var tx = new UInt64[1];
UInt64 i;
UInt64 state = 0;
StringBuilder errorString = new StringBuilder();
#if LOCAL
#else
#endif
if (rc == MAXT_SUCCESS)
if (rc == MAXT_SUCCESS)
{
Console.Write("Starting ...\n");
}
if (rc == MAXT_SUCCESS)
if (rc == MAXT_SUCCESS)
if (rc == MAXT_SUCCESS)
if (rc == MAXT_SUCCESS)
Console.Write("Setting multi DIOs to 0xFF for 10 seconds. \n");
Console.Write("Unplug the LB at any time to provoke an error. \n");
for (i = 0; i < 10000 && rc == MAXT_SUCCESS; i++)
{
if (rc == MAXT_SUCCESS)
if (rc == MAXT_SUCCESS)
if (state != 0xFF00)
Console.Write("DIOs on the multi module were not correctly set. \r\t");
}
Console.Write("\n Stopping.\n");
if (rc != MAXT_SUCCESS)
{
Console.WriteLine(errorString + "\n");
}
Console.Write("\nPress a key to terminate\n");
Console.ReadKey();
return;
}
private static UInt32 initHandler(UInt64 server, UInt64 deviceIndex, UInt64 moduleIndex, UInt64 channelIndex, UInt64 attrib, ref UInt64 value)
{
UInt64 device;
UInt32 rc;
if (attrib == KMXF_CHANNEL_CLASS)
{
if (rc == MAXT_SUCCESS)
if (rc == MAXT_SUCCESS && (deviceInfo.modules[moduleIndex].type == MXF_MODULE_MULTI_EH))
{
value = MXF_CLASS_DISCRETE;
return 1;
}
}
return 0;
}
}
}