private void Process(Event.Connected connection) { _entity = _entityFactory.Create(connection.Name, connection.Remarks, connection.MacAddress, connection.Roster); _eventMediator.Publish(new Event.Register(_entity)); _entity.Initialize(); }
private void Process(Packet.Electricity reading) { _eventMediator.Publish(new Event.Observation(_entity.Identity, _identity, _clock.Now, new Measurement(MeasurementType.Watt, reading.Channels[0].Current.Value.ToString()))); }