diff --git a/Debugging.md b/Debugging.md index 2cd52b4..f75f322 100644 --- a/Debugging.md +++ b/Debugging.md @@ -58,6 +58,8 @@ Debug.Console(0, Debug.ErrorLogLevel.Notice, "Hello World"); ## Console Commands ### Appdebug:[slot] [0-2] Gets or sets the current debug level where 0 is the lowest setting and 2 is the most verbose + +Example: ``` RMC3>appdebug:1 // Gets current level RMC3>AppDebug level = 0 @@ -71,7 +73,9 @@ Gets the current list of devices from `DeviceManager` Prints in the form [deviceKey] deviceName +Example: ``` +// Get the list of devices for program 1 RMC3>devlist:1 RMC3>[16:34:05.819]App 1:28 Devices registered with Device Mangager: @@ -106,7 +110,11 @@ RMC3>[16:34:05.819]App 1:28 Devices registered with Device Mangager: ``` ### Devprops:[slot] [deviceKey] Gets the list of public properties on the device with the corresponding `deviceKey` + +Example: ``` +// Get the properties on the device with Key 'cec-1-cec' +// This device happens to be a CEC port on a DM-TX-201-C's HDMI input RMC3>devprops:1 cec-1-cec [ { @@ -142,6 +150,57 @@ RMC3>devprops:1 cec-1-cec RMC3> ``` -### Devmethods +### Devmethods:[slot] [deviceKey] +Gets the list of public methods available on the device -### Devjson \ No newline at end of file +Example: +``` +// Get the methods on the device with Key 'cec-1-cec' +RMC3>devmethods:1 cec-1-cec +[ + { + "Name": "SendText", + "Params": [ + { + "Name": "text", + "Type": "String" + } + ] + }, + { + "Name": "SendBytes", + "Params": [ + { + "Name": "bytes", + "Type": "Byte[]" + } + ] + }, + { + "Name": "SimulateReceive", + "Params": [ + { + "Name": "s", + "Type": "String" + } + ] + }, + //... Response abbreviated for clarity ... +] + +RMC3> +``` +### Devjson:[slot] [JSON formatted object {"deviceKey", "methodName", "params"}] +Used in conjunction with devmethods, this command allows any of the public methods to be called from console and the appropriate arguments can be passed in to the method via a JSON object: + +Example: +``` +// This command will call the SendText(string text) method on the device with the Key 'cec-1-cec' +// and pass in "hello world" as the argument parameter. On this particular device, it would cause +// the string to be sent via the CEC Transmit +devjson:1 {"deviceKey":"cec-1-cec", "methodName":"SendText", "params": ["hello world\r"]} + +// This command will call SimulateReceive(string text) on the device with Key 'cec-1-cec' +// This would simulate receiving data on the CEC port of the DM-TX-201-C's HDMI input +devjson:1 {"deviceKey":"cec-1-cec", "methodName":"SimulateReceive", "params": ["hello citizen of Earth\r"]} +``` \ No newline at end of file