mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
Updated Debugging (markdown)
63
Debugging.md
63
Debugging.md
@@ -58,6 +58,8 @@ Debug.Console(0, Debug.ErrorLogLevel.Notice, "Hello World");
|
|||||||
## Console Commands
|
## Console Commands
|
||||||
### Appdebug:[slot] [0-2]
|
### Appdebug:[slot] [0-2]
|
||||||
Gets or sets the current debug level where 0 is the lowest setting and 2 is the most verbose
|
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:1 // Gets current level
|
||||||
RMC3>AppDebug level = 0
|
RMC3>AppDebug level = 0
|
||||||
@@ -71,7 +73,9 @@ Gets the current list of devices from `DeviceManager`
|
|||||||
|
|
||||||
Prints in the form [deviceKey] deviceName
|
Prints in the form [deviceKey] deviceName
|
||||||
|
|
||||||
|
Example:
|
||||||
```
|
```
|
||||||
|
// Get the list of devices for program 1
|
||||||
RMC3>devlist:1
|
RMC3>devlist:1
|
||||||
|
|
||||||
RMC3>[16:34:05.819]App 1:28 Devices registered with Device Mangager:
|
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]
|
### Devprops:[slot] [deviceKey]
|
||||||
Gets the list of public properties on the device with the corresponding `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
|
RMC3>devprops:1 cec-1-cec
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -142,6 +150,57 @@ RMC3>devprops:1 cec-1-cec
|
|||||||
RMC3>
|
RMC3>
|
||||||
|
|
||||||
```
|
```
|
||||||
### Devmethods
|
### Devmethods:[slot] [deviceKey]
|
||||||
|
Gets the list of public methods available on the device
|
||||||
|
|
||||||
### Devjson
|
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"]}
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user