public S7Tag( ////IEventBus eventBus, INotifierMediatorService notifierMediatorService, Guid id, int automationTypeId, string name, Guid connectionId, Connection connection, bool enable, string inputOutput, string analogDigitalSignal, string memoryAddress, bool invoke, Guid tagGroupId, TagGroup tagGroup,// int?dataBlock, int?offset, byte?bitOfByte, int?wordLenId, int?areaId, int?stringLength ) : base( ////eventBus, ////LogManager.GetCurrentClassLogger(), ////new Logger<Tag>(), notifierMediatorService, id, automationTypeId, name, connectionId, connection, enable, inputOutput, analogDigitalSignal, memoryAddress, invoke, tagGroupId, tagGroup ) { DataBlock = dataBlock; Offset = offset; BitOfByte = bitOfByte; WordLenId = wordLenId; AreaId = areaId; StringLength = stringLength; var s7TagValidator = new Validator.S7.Tag(); s7TagValidator.ValidateAndThrow(this); SetDataItem(); }
//For Csv public S7Tag( Guid id, int automationTypeId, string name, Guid connectionId, bool enable, string inputOutput, string analogDigitalSignal, string memoryAddress, bool invoke, Guid tagGroupId, int?dataBlock, int?offset, byte?bitOfByte, int?wordLenId, int?areaId, int?stringLength ) : base( id, automationTypeId, name, connectionId, enable, inputOutput, analogDigitalSignal, memoryAddress, invoke, tagGroupId ) { //Console.WriteLine("ForCSV: " + memoryAddress); DataBlock = dataBlock; Offset = offset; BitOfByte = bitOfByte; WordLenId = wordLenId; AreaId = areaId; StringLength = stringLength; var s7TagValidator = new Validator.S7.Tag(); s7TagValidator.ValidateAndThrow(this); SetDataItem(); }
public void Modify( Guid stdTagId, int dataBlock, int offset, byte bitOfByte, //string memoryAddress, int wordLenId, int areaId, int stringLength ) { //StdTagId = stdTagId; DataBlock = dataBlock; Offset = offset; BitOfByte = bitOfByte; //Address = address; WordLenId = wordLenId; AreaId = areaId; StringLength = stringLength; var tagValidator = new Validator.S7.Tag(); tagValidator.ValidateAndThrow(this); }