Пример #1
0
        unsafe public void MappingDispose()
        {
            // Check for exsisting mappings
            if (mapping == null)
            {
                Exception ex = new Exception("Mapping is not created.");
                throw ex;
            }

            // Dispose mappings
            ModbusPinvoke.MappingDispose(mapping);
            mapping = null;
        }
Пример #2
0
        unsafe public bool MappingNew(int NBit, int NInputBit, int NHoldingRegisters, int NInputRegister)
        {
            // Check for duplicate mappings
            if (mapping != null)
            {
                Exception ex = new Exception("Duplicate mapping creation.");
                throw ex;
            }

            // Create new mapping
            mapping = ModbusPinvoke.MappingNew(NBit, NInputBit, NHoldingRegisters, NInputRegister);

            return(mapping == null);
        }
Пример #3
0
        public unsafe bool MappingNew(int NBit, int NInputBit, int NHoldingRegisters, int NInputRegister)
        {
            // Check for duplicate mappings
            if (mapping != null) {
                Exception ex=new Exception("Duplicate mapping creation.");
                throw ex;
            }

            // Create new mapping
            mapping = ModbusPinvoke.MappingNew(NBit, NInputBit, NHoldingRegisters, NInputRegister);

            return mapping == null;
        }
Пример #4
0
        public unsafe void MappingDispose()
        {
            // Check for exsisting mappings
            if (mapping == null) {
                Exception ex=new Exception("Mapping is not created.");
                throw ex;
            }

            // Dispose mappings
            ModbusPinvoke.MappingDispose(mapping);
            mapping = null;
        }
Пример #5
0
 unsafe static internal extern void MappingDispose(MODBUS_MAPPING *map);