using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.AppServer.Messengers
{
///
/// Generic messenger for basic device communication
///
public class GenericMessenger : MessengerBase
{
///
/// Initializes a new instance of the GenericMessenger class
///
/// Unique identifier for the messenger
/// Device to communicate with
/// Path for message routing
public GenericMessenger(string key, EssentialsDevice device, string messagePath) : base(key, messagePath, device)
{
}
///
protected override void RegisterActions()
{
base.RegisterActions();
AddAction("/fullStatus", (id, content) => SendFullStatus(id));
}
private void SendFullStatus(string id = null)
{
var state = new DeviceStateMessageBase();
PostStatusMessage(state, id);
}
}
}