Beispiel #1
0
        public ProcDevice(MachineType machineType, ILogger logger)
        {
            this.Logger = logger;

            Logger.Log("Initializing P-ROC device...");

            dmdMapping = new byte[dmdMappingSize];
            for (int i = 0; i < dmdMappingSize; i++)
            {
                dmdMapping[i] = (byte)i;
            }

            g_machineType = machineType;

            dmdConfigured = false;

            ProcHandle = PinProc.PRCreate(machineType);
            if (ProcHandle == IntPtr.Zero)
            {
                throw new InvalidOperationException(PinProc.PRGetLastErrorText());
            }
        }