예제 #1
0
 public static Dictionary <uint, oni.lib.device_t> FindMachingDevices(oni.Context ctx, ONIXDevices.ID dev_id)
 {
     // Find all matching devices
     return(ctx.DeviceTable.Where(
                dev => dev.Value.id == (uint)dev_id
                ).ToDictionary(x => x.Value.idx, x => x.Value));
 }
예제 #2
0
        public ONIController()
        {
            DAQ = new oni.Context();

            // Set block read size
            // TODO: this should be a context option along with the paths
            DAQ.SetBlockReadSize(8192);
        }
예제 #3
0
 private void Initialize()
 {
     ctx                = new oni.Context(contextDriver, contextIndex);
     SystemClockHz      = ctx.SystemClockHz;
     AcquisitionClockHz = ctx.AcquisitionClockHz;
     MaxReadFrameSize   = ctx.MaxReadFrameSize;
     MaxWriteFrameSize  = ctx.MaxWriteFrameSize;
     DeviceTable        = ctx.DeviceTable;
 }
예제 #4
0
        public ONIController(string config_path,
                             string read_path,
                             string signal_path)
        {
            DAQ = new oni.Context(config_path, read_path, signal_path);

            // Set block read size
            // TODO: this should be a context option along with the paths
            DAQ.SetBlockReadSize(8192);
        }
예제 #5
0
 public void Refresh()
 {
     Dispose();
     AcqContext = new oni.Context(Driver, Index);
 }