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; }
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); }
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; }
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; }
unsafe static internal extern void MappingDispose(MODBUS_MAPPING *map);