Updated Debugging (markdown)

Neil Dorin
2020-02-11 20:52:57 -07:00
parent def7cd9b6d
commit 6fde237722

@@ -56,6 +56,8 @@ Debug.Console(0, Debug.ErrorLogLevel.Notice, "Hello World");
```
## Console Commands
The following console commands all perform actions on devices that have been registered with the `PepperDash.Essentials.Core.DeviceManager` static class
### Appdebug:[slot] [0-2]
Gets or sets the current debug level where 0 is the lowest setting and 2 is the most verbose
@@ -191,16 +193,21 @@ RMC3>devmethods:1 cec-1-cec
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:
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.
This command is most useful for testing without access to hardware as it allows both simulated input and output for a device.
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
// 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"]}
RMC3>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"]}
```
RMC3>devjson:1 {"deviceKey":"cec-1-cec", "methodName":"SimulateReceive", "params": ["hello citizen of Earth\r"]}
```
For additional examples, see this [file](https://github.com/PepperDash/Essentials/blob/master/devjson%20commands.json).