public void AddWaterTanks(WaterTanks waterTanks)
        {
            List <String> ids = new List <String>();

            foreach (WaterTanks.FluidTank tank in waterTanks.Tanks)
            {
                ids.Add(tank.ID);
            }
            Message.AddValue("Tanks", ids);
            Message.AddValue("Capacity", waterTanks.Capacity);
            Message.AddValue("PercentFull", waterTanks.PercentFull);
            Message.AddValue("Remaining", waterTanks.Remaining);
            Message.AddValue("Level", waterTanks.Level);
            Message.AddValue("Enabled", waterTanks.Enabled);
        }
        protected override void AddADMDevices(ArduinoDeviceManager adm, ADMMessage message)
        {
            if (adm == null || adm.BoardID == 0)
            {
                Tracing?.TraceEvent(TraceEventType.Error, 0, "adm is null or does not have a BoardID value");
                return;
            }

            adm.Tracing = Tracing;

            DS18B20Array temp;
            Engine       engine;
            RPMCounter   rpm;

            Engine.OilSensorSwitch oilSensor;
            String desc;

            switch (adm.BoardID)
            {
            case BOARD_ER1:
                //Temperature array for all engines connected to a board
                //Important!: this must come first as it disrupts subsequent messages if not first
                temp = new DS18B20Array(4, "temp_arr");
                temp.SampleInterval = TEMP_SAMPLE_INTERVAL;
                temp.SampleSize     = TEMP_SAMPLE_SIZE;
                temp.AddSensor(INDUK_ID + "_temp");
                temp.AddSensor(BANTU_ID + "_temp");
                adm.AddDevice(temp);

                //Pompa celup
                _pompaCelup = new Pump(10, POMPA_CELUP_ID);
                _pompaCelup.MaxOnDuration = 12 * 60;     //raise an alarm if on for more than 15 minutes
                _pompaCelup.Initialise(_erdb);
                _pompaCelup.SampleInterval = REQUEST_STATE_INTERVAL;
                _pompaCelup.SampleSize     = 1;
                adm.AddDevice(_pompaCelup);

                //Pompa solar
                _pompaSolar = new Pump(11, POMPA_SOLAR_ID);
                _pompaSolar.MaxOnDuration = 15 * 60;     //raise an alarm if on for more than 15 minutes
                _pompaSolar.Initialise(_erdb);
                _pompaSolar.SampleInterval = REQUEST_STATE_INTERVAL;
                _pompaSolar.SampleSize     = 1;
                adm.AddDevice(_pompaSolar);

                //Induk
                rpm = new RPMCounter(5, INDUK_ID + "_rpm", "RPM");
                rpm.SampleInterval  = RPM_SAMPLE_INTERVAL;
                rpm.SampleSize      = RPM_SAMPLE_SIZE;
                rpm.SamplingOptions = RPM_SAMPLING_OPTIONS;
                rpm.Calibration     = RPM_CALIBRATION_INDUK;

                oilSensor = new Engine.OilSensorSwitch(8, INDUK_ID + "_oil");
                oilSensor.SampleInterval = REQUEST_STATE_INTERVAL;
                oilSensor.SampleSize     = 1;

                engine = new Engine(INDUK_ID, rpm, oilSensor, temp.GetSensor(INDUK_ID + "_temp"));
                engine.Initialise(_erdb);
                adm.AddDeviceGroup(engine);

                //Bantu
                rpm = new RPMCounter(6, BANTU_ID + "_rpm", "RPM");
                rpm.SampleInterval  = RPM_SAMPLE_INTERVAL;
                rpm.SampleSize      = RPM_SAMPLE_SIZE;
                rpm.SamplingOptions = RPM_SAMPLING_OPTIONS;
                rpm.Calibration     = RPM_CALIBRATION_BANTU;

                oilSensor = new Engine.OilSensorSwitch(9, BANTU_ID + "_oil");
                oilSensor.SampleInterval = REQUEST_STATE_INTERVAL;
                oilSensor.SampleSize     = 1;

                engine = new Engine(BANTU_ID, rpm, oilSensor, temp.GetSensor(BANTU_ID + "_temp"));
                engine.Initialise(_erdb);
                adm.AddDeviceGroup(engine);
                break;

            case BOARD_ER2:
                //temperature array for all engines connected to a board
                temp = new DS18B20Array(4, "temp_arr");
                temp.SampleInterval = 2 * TEMP_SAMPLE_INTERVAL;
                temp.SampleSize     = TEMP_SAMPLE_SIZE;
                temp.AddSensor(GENSET2_ID + "_temp");
                temp.AddSensor(GENSET1_ID + "_temp");
                adm.AddDevice(temp);

                //genset 1
                rpm = new RPMCounter(6, GENSET1_ID + "_rpm", "RPM");
                rpm.SampleInterval  = RPM_SAMPLE_INTERVAL;
                rpm.SampleSize      = RPM_SAMPLE_SIZE;
                rpm.SamplingOptions = RPM_SAMPLING_OPTIONS;
                rpm.Calibration     = RPM_CALIBRATION_GENSET1;

                oilSensor = new Engine.OilSensorSwitch(9, GENSET1_ID + "_oil");
                oilSensor.SampleInterval = REQUEST_STATE_INTERVAL;
                oilSensor.SampleSize     = 1;

                engine = new Engine(GENSET1_ID, rpm, oilSensor, temp.GetSensor(GENSET1_ID + "_temp"));
                engine.Initialise(_erdb);
                adm.AddDeviceGroup(engine);

                //genset 2
                rpm = new RPMCounter(5, GENSET2_ID + "_rpm", "RPM");
                rpm.SampleInterval  = RPM_SAMPLE_INTERVAL;
                rpm.SampleSize      = RPM_SAMPLE_SIZE;
                rpm.SamplingOptions = RPM_SAMPLING_OPTIONS;
                rpm.Calibration     = RPM_CALIBRATION_GENSET2;

                oilSensor = new Engine.OilSensorSwitch(8, GENSET2_ID + "_oil");
                oilSensor.SampleInterval = REQUEST_STATE_INTERVAL;
                oilSensor.SampleSize     = 1;

                engine = new Engine(GENSET2_ID, rpm, oilSensor, temp.GetSensor(GENSET2_ID + "_temp"));
                engine.Initialise(_erdb);
                adm.AddDeviceGroup(engine);
                break;

            case BOARD_ER3:
                _waterTanks = new WaterTanks();
                _waterTanks.AddTank("wt1", 4, 5, 1200, 28, 102);
                _waterTanks.AddTank("wt2", 6, 7, 1100, 28, 110);
                _waterTanks.AddTank("wt3", 8, 9, 1100, 28, 100);
                _waterTanks.AddTank("wt4", 10, 11, 1100, 32, 100);
                _waterTanks.Initialise(_erdb);
                adm.AddDeviceGroup(_waterTanks);
                break;
            } //end board switch
        }