public void AddPutBit(XStateType stateType, XBinaryBase binaryBase, DatabaseType databaseType) { Add(FormulaOperationType.PUTBIT, (byte)stateType, binaryBase.GetDatabaseNo(databaseType), "Запись состояния " + stateType.ToDescription() + " " + XBinaryBaseToString(binaryBase)); }
public void AddGetBitOff(XStateType stateType, XBinaryBase binaryBase, DatabaseType databaseType) { Add(FormulaOperationType.GETBIT, (byte)stateType, binaryBase.GetDatabaseNo(databaseType), "Проверка состояния " + stateType.ToDescription() + " " + XBinaryBaseToString(binaryBase)); Add(FormulaOperationType.GETBIT, (byte)XStateType.Ignore, binaryBase.GetDatabaseNo(databaseType)); Add(FormulaOperationType.COM); Add(FormulaOperationType.AND); }
string XBinaryBaseToString(XBinaryBase binaryBase) { return binaryBase.BinaryInfo.Type + " " + binaryBase.BinaryInfo.Name + " " + binaryBase.BinaryInfo.Address; }