public static MCP CreateSetGroupTypeCmd(int groupId, McpGroupType type) { return(MCP.Create(McpCommand.SetValue, groupId, (int)type)); }
public static MCP CreateSetRequestableCmd(int groupId, int portId) { return(MCP.Create(McpCommand.SetValue, groupId + 16, portId)); }
public static MCP CreateChangePassCmd(string newpassword) { return(MCP.Create(McpCommand.ChangePasswd, newpassword)); }
public static MCP CreateSetGroupNameCmd(int groupId, string name) { return(MCP.Create(McpCommand.SetGroupName, groupId, name)); }
public static MCP CreateSetPortTypeCmd(int portId, McpPortType type) { return(MCP.Create(McpCommand.SetType, portId, (int)type)); }
public static MCP CreateJmcpGetValuesCmd() { return(MCP.Create(McpCommand.Jmcp, "{\"cmd\":\"GET_VALUES\"}")); }
public static MCP CreateSetUserRightsCmd(int userId, IList <byte> groupIds) { return(MCP.Create(McpCommand.SetUserRights, userId, groupIds.ToArray())); }
public static MCP CreateGetPortsCmd() { return(MCP.Create(McpCommand.GetPorts)); }
public static MCP CreateGetUsersCmd() { return(MCP.Create(McpCommand.Jmcp, "{\"cmd\":\"GET_USERS\"}")); }
public static MCP CreateAddUserCmd(string username, string password) { return(MCP.Create(McpCommand.AddUser, username, password)); }
public static MCP CreateScanWifiCmd() { return(MCP.Create(McpCommand.ScanWifi)); }
public static MCP CreateGetWifiStateCmd() { return(MCP.Create(McpCommand.GetWifiState)); }
public static MCP CreateSetGatewayNameCmd(string name) { return(MCP.Create(McpCommand.SetName, name)); }
public static MCP CreateSetGroupedPortsCmd(int groupId, IList <byte> portIds) { return(MCP.Create(McpCommand.SetGroupedPorts, groupId, portIds.ToArray())); }
public static MCP CreateRemoveUserCmd(int userId) { return(MCP.Create(McpCommand.RemoveUser, userId)); }
//public static MCP CreateSetValueCmd(int address, int value) //{ // return MCP.Create(McpCommand.SetValue, address, value); //} public static MCP CreateGetTransitionCmd(int newId) { return(MCP.Create(McpCommand.HmGetTransition, newId)); }
public static MCP CreateGetGroupsCmd() { return(MCP.Create(McpCommand.Jmcp, "{\"cmd\":\"GET_GROUPS\"}")); }
public static MCP CreateRemovePortCmd(int portId) { return(MCP.Create(McpCommand.RemovePort, portId)); }
public static MCP CreateAddGroupCmd() { return(MCP.Create(McpCommand.AddGroup)); }
public static MCP CreateSetPortStateCmd(int portId, McpPortState state) { return(MCP.Create(McpCommand.SetState, portId, (int)state)); }
public static MCP CreateRemoveGroupCmd(int groupId) { return(MCP.Create(McpCommand.RemoveGroup, groupId)); }
private static MCP Create(McpCommand cmd, int val, string val2) { return(MCP.Create(cmd, val, Encoding.UTF8.GetBytes(val2))); }
public static MCP CreateLoginCmd(string user, string password) { return(MCP.Create(McpCommand.Login, user, password)); }