From 335882caa799cbb5d092f0f59916817cb408f952 Mon Sep 17 00:00:00 2001 From: Johnathan Date: Fri, 28 Feb 2020 13:58:00 -0700 Subject: [PATCH 1/8] First pass at reference docs for .net-sdk --- scripts/metalsmith.js | 9 + .../net-sdk/mistyrobotics-common/data.md | 261 ++++++++++++++++++ .../mistyrobotics-common/properties.md | 8 + .../mistyrobotics-common/serialization.md | 8 + .../mistyrobotics-common/types-validation.md | 8 + .../net-sdk/mistyrobotics-common/types.md | 8 + templates/layouts/coding-net.hbs | 65 +++++ templates/layouts/onboarding_net.hbs | 65 +++++ 8 files changed, 432 insertions(+) create mode 100644 src/content/net-sdk/mistyrobotics-common/data.md create mode 100644 src/content/net-sdk/mistyrobotics-common/properties.md create mode 100644 src/content/net-sdk/mistyrobotics-common/serialization.md create mode 100644 src/content/net-sdk/mistyrobotics-common/types-validation.md create mode 100644 src/content/net-sdk/mistyrobotics-common/types.md create mode 100755 templates/layouts/coding-net.hbs create mode 100755 templates/layouts/onboarding_net.hbs diff --git a/scripts/metalsmith.js b/scripts/metalsmith.js index e37afc4e..7b90bc84 100755 --- a/scripts/metalsmith.js +++ b/scripts/metalsmith.js @@ -173,6 +173,15 @@ exports.metalsmith = function() { 'rest-api' ] }, + net_sdk: { + pattern: 'net-sdk/:section/*.md', + sortBy: 'order', + orderDynamicCollections: [ + 'mistyrobotics-common', + 'mistyrobotics-sdk', + 'mistyrobotics-tools' + ] + }, tools_and_apps: { pattern: 'tools-&-apps/:section/*md', sortBy: 'order', diff --git a/src/content/net-sdk/mistyrobotics-common/data.md b/src/content/net-sdk/mistyrobotics-common/data.md new file mode 100644 index 00000000..cea0154e --- /dev/null +++ b/src/content/net-sdk/mistyrobotics-common/data.md @@ -0,0 +1,261 @@ +--- +title: Data +layout: coding-net.hbs +columns: three +order: 1 +--- + +# {{title}} + +## AudioDetails + +Details of an audio file. Applies to audio files you save to Misty with the `SaveAudio` command, system audio assets, and audio recordings that Misty creates. + +*Serializable* + +### AudioDetails Properties + +* `Name` (string) - The name of the audio file, with the file type extension. + +```csharp +public string Name { get; set; } +``` + +* `SystemAsset` (bool) - Whether the audio file is one of Misty's default system assets. + +```csharp +public bool SystemAsset { get; set; } +``` + +## AudioFile + +Data and metadata for an audio file. + +*Serializable* + +### AudioFile Properties + +* `Name` (string) - The name of the audio file, with the file type extension. + +```csharp +public string Name { get; set; } +``` + +* `ContentType` (string) - The content type of the audio file. + +```csharp +public string ContentType { get; set; } +``` + +* `Base64` (string) - A string with the Base64-encoded audio file data. This data returns when you specify that the audio file data should be returned as Base64 data. + +```csharp +public string Base64 { get; set; } +``` + +* Audio (IEnumerable) - A byte array of the audio file data. This data returns when you do not specify that the audio file should be returned as a Base64 string. + +```csharp +[JsonConverter(typeof(ByteArrayConverter))] +public IEnumerable Audio { get; set; } +``` + +## BatteryChargeDetails + +Misty's current battery charge and other details about the battery. + +*Serializable* + +### BatteryChargeDetails Properties + +* `ChargePercent` (double) - Decimal value representing current charge percent. + +```csharp +public double? ChargePercent { get; set; } +``` + +* `Temperature` (int) - Current battery temperature. + +```csharp +public int Temperature { get; set; } +``` + + + +* `State` (`BatteryChargingState`) - The charge state of the battery. + +```csharp +public BatteryChargingState State { get; set; } +``` + +* `Trained` (bool) - Returns `true` if the battery has been trained. Otherwise, `false`. If the battery has not been trained, the value provided for `ChargePercent` is an approximation. + +```csharp +public bool Trained { get; set; } +``` + +* `Voltage` (double) - The battery's current voltage. + +```csharp +public double Voltage { get; set; } +``` + +* `Current` (double) - The current flowing into or discharging from the battery. This value is negative when the battery is discharging, and positive when the battery is being charged. + +```csharp +public double Current { get; set; } +``` + +* `HealthPercent` (double) - The health of the battery. + +```csharp +public double? HealthPercent { get; set; } +``` + +* `IsCharging` (bool) - Returns `true` if the battery is charging. Otherwise, `false`. + +```csharp +public bool IsCharging +{ + get + { + return State == BatteryChargingState.Charging; + } +} +``` + +## BlinkSettings + +The current settings for Misty's blinking behavior. + +*Serializable* + +### BlinkSettings Properties + +* `BlinkImages` (`IDictionary`) - A dictionary of blink mappings for each image on the robot. When blinking is enabled, these are the mappings that each image alternates between. + +```csharp +public IDictionary BlinkImages { get; set; } = new Dictionary(); +``` + +* `OpenEyeMinMs` (int) - The minimum duration (in milliseconds) that Misty's eyes stay open while blinking. + +```csharp +public int OpenEyeMinMs { get; set; } +``` + +* `OpenEyeMaxMs` (int) - The maximum duration (in milliseconds) that Misty's eyes stay open while blinking. + +```csharp +public int OpenEyeMaxMs { get; set; } +``` + +* `ClosedEyeMinMs` (int) - The minimum duration (in milliseconds) that Misty's eyes stay closed while blinking. + +```csharp +public int ClosedEyeMinMs { get; set; } +``` + +* `ClosedEyeMaxMs` (int) - The maximum duration (in milliseconds) that Misty's eyes stay closed while blinking. + +```csharp +public int ClosedEyeMaxMs { get; set; } +``` + +## BoardDetails + +Details about one of Misty's boards. + +*Serializable* + +### BoardDetails Properties + +* `BoardId` (string) - The ID for the board. + +```csharp +public string BoardId { get; set; } +``` + +* `Hardware` (string) - The hardware version for the board. + +```csharp +public string Hardware { get; set; } +``` + +* `Firmware` (string) - The firmware version for the board. + +```csharp +public string Firmware { get; set; } +``` + +## BumpedState + +## CameraDetails + +## CameraState + +## CapTouchedState + +## CharacteristicData + +## ChargerPose + +## DepthImageDetails + +## ExposureAndGainDetails + +## FaceTrainingDetails + +## ImageDetails + +## ImageFile + +## INativeRobotSkill + +## INativeSkill + +## MapCell + +## MapDetails + +## MentalStateDetails + +## NativeRobotSkill + +## NativeValidation + +## RecordedVideo + +## RecordedVideoDetails + +## Relevance + +## RGBColor + +## RobotAffect + +## RobotInformation + +## RobotPose + +## RobotUpdateSettings + +## RunningSkillDetails + +## SendExternalResponseDetails + +## SensorHazardStatus + +## SlamMap + +## SlamStatusDetails + +## Validation + +## VideoDetails + +## VideoFile + +## WebsocketName + +## WorldObjectDetails \ No newline at end of file diff --git a/src/content/net-sdk/mistyrobotics-common/properties.md b/src/content/net-sdk/mistyrobotics-common/properties.md new file mode 100644 index 00000000..96adf928 --- /dev/null +++ b/src/content/net-sdk/mistyrobotics-common/properties.md @@ -0,0 +1,8 @@ +--- +title: Properties +layout: coding-net.hbs +columns: three +order: 2 +--- + +# {{title}} \ No newline at end of file diff --git a/src/content/net-sdk/mistyrobotics-common/serialization.md b/src/content/net-sdk/mistyrobotics-common/serialization.md new file mode 100644 index 00000000..8ef3eb0d --- /dev/null +++ b/src/content/net-sdk/mistyrobotics-common/serialization.md @@ -0,0 +1,8 @@ +--- +title: Serialization +layout: coding-net.hbs +columns: three +order: 3 +--- + +# {{title}} \ No newline at end of file diff --git a/src/content/net-sdk/mistyrobotics-common/types-validation.md b/src/content/net-sdk/mistyrobotics-common/types-validation.md new file mode 100644 index 00000000..13c32434 --- /dev/null +++ b/src/content/net-sdk/mistyrobotics-common/types-validation.md @@ -0,0 +1,8 @@ +--- +title: Types.Validation +layout: coding-net.hbs +columns: three +order: 5 +--- + +# {{title}} \ No newline at end of file diff --git a/src/content/net-sdk/mistyrobotics-common/types.md b/src/content/net-sdk/mistyrobotics-common/types.md new file mode 100644 index 00000000..ddee998a --- /dev/null +++ b/src/content/net-sdk/mistyrobotics-common/types.md @@ -0,0 +1,8 @@ +--- +title: Types +layout: coding-net.hbs +columns: three +order: 4 +--- + +# {{title}} \ No newline at end of file diff --git a/templates/layouts/coding-net.hbs b/templates/layouts/coding-net.hbs new file mode 100755 index 00000000..888a47a8 --- /dev/null +++ b/templates/layouts/coding-net.hbs @@ -0,0 +1,65 @@ + + + + {{> head sectionTitle='Docs'}} + + +
+ {{> header}} + +
+ +
+
+
+ {{{contents}}} +
+
+
+
+
+
+ {{> scripts}} + + + diff --git a/templates/layouts/onboarding_net.hbs b/templates/layouts/onboarding_net.hbs new file mode 100755 index 00000000..888a47a8 --- /dev/null +++ b/templates/layouts/onboarding_net.hbs @@ -0,0 +1,65 @@ + + + + {{> head sectionTitle='Docs'}} + + +
+ {{> header}} + +
+ +
+
+
+ {{{contents}}} +
+
+
+
+
+
+ {{> scripts}} + + + From e6c9a4ccdbdf6048f9e4500974514d0733385f05 Mon Sep 17 00:00:00 2001 From: Johnathan Date: Fri, 28 Feb 2020 16:17:39 -0700 Subject: [PATCH 2/8] Add more properties for members of the Data namespace --- .../net-sdk/mistyrobotics-common/data.md | 150 +++++++++++++++++- 1 file changed, 149 insertions(+), 1 deletion(-) diff --git a/src/content/net-sdk/mistyrobotics-common/data.md b/src/content/net-sdk/mistyrobotics-common/data.md index cea0154e..a386a6af 100644 --- a/src/content/net-sdk/mistyrobotics-common/data.md +++ b/src/content/net-sdk/mistyrobotics-common/data.md @@ -190,18 +190,166 @@ public string Firmware { get; set; } ## BumpedState + + +The state of Misty's bump sensors, as provided in `SelfState` event messages. + +*Serializable* + +### BumpedState Properties + +* `EngagedSensors` (`IList`) - A list of the newly engaged bump sensors. + +```csharp +public IList EngagedSensors +{ + get; +} +``` + +* `DisengagedSensors` (`IList`) - A list of the newly disengaged bump sensors. + +```csharp +public IList DisengagedSensors +{ + get; +} +``` + ## CameraDetails + + +Details about Misty's RGB camera. + +*Serializable* + +### CameraDetailsProperties + +* `Width` (double) - Width (in pixels) of camera images. + +```csharp +public double Width { get; set; } +``` + +* `Height` (double) - Height (in pixels) of camera images. + +```csharp +public double Height { get; set; } +``` + +* `FpsRequested` (double) - Requested frames per seconds. + +```csharp +public double FpsRequested { get; set; } +``` + +* `FpsActual` (double) - Actual frames per second. + +```csharp +public double FpsActual { get; set; } +``` + +* `DroppedFrames` (int) - Number of dropped frames. + +```csharp +public int DroppedFrames { get; set; } +``` + ## CameraState +The status and current activity of Misty's RGB camera. + +*Serializable* + +### CameraState Properties + +* `IsTakingPicture` (bool) - If `true`, Misty is currently taking a picture with her RGB camera. + +```csharp +public bool IsTakingPicture { get; set; } +``` + +* `OnboardCameraStatus` (`RobotCameraStatus`) - Current status of Misty's RGB camera. + +```csharp +public RobotCameraStatus OnboardCameraStatus { get; set; } +``` + ## CapTouchedState + +The state of Misty's capacitive touch sensors, as provided in `SelfState` event messages. + +*Serializable* + +### CapTouchedState Properties + +* `EngagedSensors` (`IList`) - A list of newly engaged capacitive touch sensors. + +```csharp +public IList EngagedSensors +{ + get; +} +``` + +* `DisengagedSensors` (`IList`) - A list of newly disengaged capacitive touch sensors. + +```csharp +public IList DisengagedSensors +{ + get; +} +``` -## CharacteristicData + + ## ChargerPose +Location data for Misty's docking station (also referred to as the *charger* or *charging station*). + +*Serializable* + +### ChargerPose Properties + +* `HomogeneousMatrix` (`float[]`) - The docking station's position and orientation (pose) relative to the robot's right infrared (IR) camera, represented as a column major 4x4 homogeneous coordinate matrix. The 3x3 matrix of values in the upper left is a rotation matrix. The three values in the upper right represent the X, Y, and Z coordinates (in meters) at the point on the docking station over which Misty should be centered in order to receive a charge. The origin (0, 0, 0) point of this data is the front right IR camera in Misty's depth sensor. All data is relative to the depth sensor's frame of reference (Z is forward, X is to the right, and Y is down). + +```csharp +public float[] HomogeneousMatrix { get; set; } +``` + ## DepthImageDetails +Details and data for depth images that Misty captures with the depth sensor in her visor. These details describe the distance of obstacles from Misty's visor. + + +{{box op="start" cssClass="boxed noteBox"}} +**Note:** Depending on the scene Misty views, the sensor may return a large proportion of "unknown" values in the form of `NaN` ("not a number") values. +{{box op="end"}} + +*Serializable* + +### DepthImageDetails Properties + +* `Width` (int) - Width of the `Image` matrix. + +```csharp +public int Width { get; set; } +``` + +* `Height` (int) - Height of the `Image` matrix. + +```csharp +public int Height { get; set; } +``` + +* `Image` (`IList`) - A matrix of size `Height` x `Width` containing individual values of type `float`. Each value represents the distance (in millimeters) from Misty's depth sensor for a pixel in the captured image. For example, if you point the sensor at a flat wall 2 meters away, most of the values in the matrix should be around 2000. **Note:** As Misty moves further away from objects, each pixel value represents a larger surface area. Conversely, if Misty moves closer to an object, each pixel represents a smaller surface area. + +```csharp +public IList Image { get; set; } +``` + ## ExposureAndGainDetails ## FaceTrainingDetails From b108e9cf671390c45993052d65b03d96be70520c Mon Sep 17 00:00:00 2001 From: Johnathan Date: Mon, 2 Mar 2020 16:03:13 -0700 Subject: [PATCH 3/8] Update .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 1dde8fbd..bb1387bb 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ npm-debug.log api-node api-service-libraries _pdf-datasheets-build/ +.vale.ini +/styles/* From c59acab3928d59a607bf0ca9137cc203377f5f0a Mon Sep 17 00:00:00 2001 From: Johnathan Date: Mon, 2 Mar 2020 16:14:42 -0700 Subject: [PATCH 4/8] Vale style fixes --- .../net-sdk/mistyrobotics-common/data.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/content/net-sdk/mistyrobotics-common/data.md b/src/content/net-sdk/mistyrobotics-common/data.md index a386a6af..44085e67 100644 --- a/src/content/net-sdk/mistyrobotics-common/data.md +++ b/src/content/net-sdk/mistyrobotics-common/data.md @@ -41,19 +41,19 @@ Data and metadata for an audio file. public string Name { get; set; } ``` -* `ContentType` (string) - The content type of the audio file. +* `ContentType` (string) - The content-type of the audio file. ```csharp public string ContentType { get; set; } ``` -* `Base64` (string) - A string with the Base64-encoded audio file data. This data returns when you specify that the audio file data should be returned as Base64 data. +* `Base64` (string) - A string with the Base64-encoded audio file data. This data returns when you specify that the system should return the audio file data as a Base64-encoded string. ```csharp public string Base64 { get; set; } ``` -* Audio (IEnumerable) - A byte array of the audio file data. This data returns when you do not specify that the audio file should be returned as a Base64 string. +* Audio (IEnumerable) - A byte array of the audio file data. This data returns when you don't specify that the system should return the audio file data as a Base64-encoded string. ```csharp [JsonConverter(typeof(ByteArrayConverter))] @@ -68,7 +68,7 @@ Misty's current battery charge and other details about the battery. ### BatteryChargeDetails Properties -* `ChargePercent` (double) - Decimal value representing current charge percent. +* `ChargePercent` (double) - Decimal value representing the current charge percentage. ```csharp public double? ChargePercent { get; set; } @@ -88,7 +88,7 @@ public int Temperature { get; set; } public BatteryChargingState State { get; set; } ``` -* `Trained` (bool) - Returns `true` if the battery has been trained. Otherwise, `false`. If the battery has not been trained, the value provided for `ChargePercent` is an approximation. +* `Trained` (bool) - Returns `true` if the battery is trained. Otherwise, `false`. If the battery isn't trained, the value provided for `ChargePercent` is an approximation. ```csharp public bool Trained { get; set; } @@ -100,7 +100,7 @@ public bool Trained { get; set; } public double Voltage { get; set; } ``` -* `Current` (double) - The current flowing into or discharging from the battery. This value is negative when the battery is discharging, and positive when the battery is being charged. +* `Current` (double) - The current flowing into or discharging from the battery. This value is negative when the battery is discharging, and positive when the battery is charging. ```csharp public double Current { get; set; } @@ -132,7 +132,7 @@ The current settings for Misty's blinking behavior. ### BlinkSettings Properties -* `BlinkImages` (`IDictionary`) - A dictionary of blink mappings for each image on the robot. When blinking is enabled, these are the mappings that each image alternates between. +* `BlinkImages` (`IDictionary`) - A dictionary of blink mappings for each image on the robot. The first image in each dictionary pair is the "open-eye" image; the second image is the "closed-eye" image. ```csharp public IDictionary BlinkImages { get; set; } = new Dictionary(); @@ -264,7 +264,7 @@ The status and current activity of Misty's RGB camera. ### CameraState Properties -* `IsTakingPicture` (bool) - If `true`, Misty is currently taking a picture with her RGB camera. +* `IsTakingPicture` (bool) - If `true`, Misty is taking a picture with her RGB camera. ```csharp public bool IsTakingPicture { get; set; } @@ -313,7 +313,7 @@ Location data for Misty's docking station (also referred to as the *charger* or ### ChargerPose Properties -* `HomogeneousMatrix` (`float[]`) - The docking station's position and orientation (pose) relative to the robot's right infrared (IR) camera, represented as a column major 4x4 homogeneous coordinate matrix. The 3x3 matrix of values in the upper left is a rotation matrix. The three values in the upper right represent the X, Y, and Z coordinates (in meters) at the point on the docking station over which Misty should be centered in order to receive a charge. The origin (0, 0, 0) point of this data is the front right IR camera in Misty's depth sensor. All data is relative to the depth sensor's frame of reference (Z is forward, X is to the right, and Y is down). +* `HomogeneousMatrix` (`float[]`) - The docking station's position and orientation (pose) relative to the robot's right infrared (IR) camera, represented as a column major 4×4 homogeneous coordinate matrix. The 3×3 matrix of values in the upper left is a rotation matrix. The three values in the upper right represent the X, Y, and Z coordinates (in meters) at the point on the docking station over which Misty should be centered to receive a charge. The origin (0, 0, 0) point of this data is the front right IR camera in Misty's depth sensor. All data is relative to the depth sensor's frame of reference (Z is forward, X is to the right, and Y is down). ```csharp public float[] HomogeneousMatrix { get; set; } @@ -344,7 +344,7 @@ public int Width { get; set; } public int Height { get; set; } ``` -* `Image` (`IList`) - A matrix of size `Height` x `Width` containing individual values of type `float`. Each value represents the distance (in millimeters) from Misty's depth sensor for a pixel in the captured image. For example, if you point the sensor at a flat wall 2 meters away, most of the values in the matrix should be around 2000. **Note:** As Misty moves further away from objects, each pixel value represents a larger surface area. Conversely, if Misty moves closer to an object, each pixel represents a smaller surface area. +* `Image` (`IList`) - A matrix of size `Height`×`Width` containing individual values of type `float`. Each value represents the distance (in millimeters) from Misty's depth sensor for a pixel in the captured image. For example, if you point the sensor at a flat wall 2 meters away, most of the values in the matrix should be around 2000. **Note:** As Misty moves further away from objects, each pixel value represents a larger surface area. Conversely, if Misty moves closer to an object, each pixel represents a smaller surface area. ```csharp public IList Image { get; set; } From 197ca1e85ee4909d86cee6b4bdc51b858311abbc Mon Sep 17 00:00:00 2001 From: Johnathan Date: Tue, 31 Mar 2020 11:15:08 -0600 Subject: [PATCH 5/8] Add members of Data namespace --- .../net-sdk/mistyrobotics-common/data.md | 234 ++++++++++++++++++ 1 file changed, 234 insertions(+) diff --git a/src/content/net-sdk/mistyrobotics-common/data.md b/src/content/net-sdk/mistyrobotics-common/data.md index 44085e67..4ebfb3f7 100644 --- a/src/content/net-sdk/mistyrobotics-common/data.md +++ b/src/content/net-sdk/mistyrobotics-common/data.md @@ -216,6 +216,26 @@ public IList DisengagedSensors } ``` +## BumpSensorSetting + +The hazards system settings for one of Misty's bump sensors. + +*Serializable* + +### BumpSensorSetting Properties + +* `BumpSensorPosition` (`BumpSensorPosition`) - The position of the bump sensor associated with this setting. + +```csharp +public BumpSensorPosition BumpSensorPosition { get; set; } +``` + +* `Enabled` (bool) - Whether this bump sensor is enabled. + +```csharp +public bool Enabled { get; set; } +``` + ## CameraDetails @@ -352,14 +372,228 @@ public IList Image { get; set; } ## ExposureAndGainDetails +Information about the current exposure and gain levels for the cameras in Misty's Structure Core sensor. + +*Serializable* + +### ExposureAndGainDetails Properties + +* `Exposure` (float) - Current exposure level (in seconds). + +```csharp +public float Exposure { get; set; } +``` + +* `Gain` (float) - Current gain level (in dB). + +```csharp +public float Gain { get; set; } +``` + ## FaceTrainingDetails +Information about a face training request. + +*Serializable* + +### FaceTrainingDetails Properties + +* `Message` (string) - A message about the face training request. + +```csharp +public string Message { get; set; } +``` + +* `MessageType` (`MessageType`) - The type of message (`Status`, `Warn`, or `Error`). + +```csharp +public FaceTrainingMessageType MessageType { get; set; } +``` + +## HazardSettingDetails + +Information about the current hazards system settings for Misty's time-of-flight (ToF) and bump sensors. + +*Serializable* + +### HazardSettingDetails Properties + +* `BumpSensorSettings` (`IList`) - A list of Misty's bump sensors, and whether each sensor is enabled in the hazards system. + +```csharp +public IList BumpSensorSettings { get; set; } +``` + +* `TimeOfFlightSensorSettings` (`IList`) - A list of Misty's time-of-flight sensors, and the distance threshold that triggers a hazard response for each sensor. If the distance threshold for a sensor is 0, that sensor is disabled in the hazards system. + +```csharp +public IList TimeOfFlightSensorSettings { get; set; } +``` + +## HazardSettings + +Data for changing the hazard system settings for Misty's bump and time-of-flight (ToF) and bump sensors. + +*Serializable* + +### HazardSettings Properties + +* `RevertToDefault` (bool) - If `true`, sets Misty to use the default hazards system settings, and ignores all other `HazardSettings` fields. + +```csharp +public bool RevertToDefault { get; set; } +``` + +* `DisableTimeOfFlights` (bool) - If `true`, disables hazards for all time-of-flight sensors by setting the distance threshold for each sensor to 0, and ignores other time-of-flight fields. + +```csharp +public bool DisableTimeOfFlights { get; set; } +``` + +* `DisableBumpSensors` (bool) - If `true`, disables hazards for all bump sensors, and ignores other bump sensor fields. + +```csharp +public bool DisableBumpSensors { get; set; } +``` + +* `BumpSensorsEnabled` ([`IList`](./#bumpsensorsetting)) - A list for turning hazards on or off for each of Misty's bump sensors. + +```csharp +public IList BumpSensorsEnabled { get; set; } +``` + +* `TimeOfFlightThresholds` [`IList TimeOfFlightThresholds { get; set; } +``` + ## ImageDetails +Details about a system or user-uploaded image asset. + +*Serializable* + +### ImageDetails Properties + +* `Name` (string) - The name of the file, with the file type extension. + +```csharp +public string Name { get; set; } +``` + +* `Height` (double) - Image height (in pixels). + +```csharp +public double Height { get; set; } +``` + +* `Width` (double) - Image width (in pixels). + +```csharp +public double Width { get; set; } +``` + +* `SystemAsset` (bool) - Whether the image is one of Misty's default system assets. For example, `SystemAsset` is `true` for each image in the set of eye assets that arrive with Misty. + +```csharp +public bool SystemAsset { get; set; } +``` + ## ImageFile +Information about a requested image file. + +*Serializable* + +### ImageFileProperties + +* `Name` (string) - The name of the file, with the file type extension. + +```csharp +public string Name { get; set; } +``` + +* `Height` (double) - Image height (in pixels). + +```csharp +public double Height { get; set; } +``` + +* `Width` (double) - Image width (in pixels). + +```csharp +public double Width { get; set; } +``` + +* `SystemAsset` (bool) - Whether the image is one of Misty's default system assets. For example, `SystemAsset` is `true` for each image in the set of eye assets that arrive with Misty. + +```csharp +public bool SystemAsset { get; set; } +``` + +* `ContentType` (string) - The type and format of the image file. + +```csharp +public string ContentType { get; set; } +``` + +* `Base64` (string) - A string containing the Base64-encoded image data (if the image was requested in Base64). + +```csharp +public string Base64 { get; set; } +``` + + +* `Image` (`IEnumerable`) - The byte array of the image data (if the image was **not** requested in Base64). + +```csharp +[JsonConverter(typeof(ByteArrayConverter))] +public IEnumerable Image { get; set; } +``` + ## INativeRobotSkill +Configuration attributes and other details for a .NET skill. + +* `AllowedCleanupTimeInMs` (uint) - The amount of time (in milliseconds) given to perform cleanup tasks when a skill is cancelled or times out. When a skill ends, the system cannot restart that skill until after this time has elapsed. Default is 2000. Maximum is 10000. + +```csharp +uint AllowedCleanupTimeInMs { get; set; } +``` + +* `UniqueId` (Guid) - The unique id associated with this skill. You cannot start a skill from the robot unless that skill has a valid Guid associated with this property. + +```csharp +Guid UniqueId { get; } +``` + +* `Name` (string) - A name of your choosing for the skill. The Skill Runner web page displays this name for the skill when connected to your robot. + +```csharp +string Name { get; } +``` + +* `Description` (string) - An optional description for your skill. + +```csharp +string Description { get; set; } +``` + +* `BroadcastMode` (`BroadcastMode`) - Setting that determines the content and frequency of messages this skill broadcasts to `SkillData` event listeners. + +```csharp +BroadcastMode BroadCastMode { get; set; } +``` + +* `StartupRules` (`IList`) - +* `TimeoutInSeconds` (int) - +* `SharedStorageLifetime` (`SkillStorageLifetime`) - +* `ReadPermissions` (`IList`) - +* `WritePermissions` (`IList`) - +* `StartPermissions` (`IList`) - +* `TriggerPermissions` (`IList`) - + ## INativeSkill ## MapCell From 5df2f8b35cfc21a278d6f7465e693b9e66a39743 Mon Sep 17 00:00:00 2001 From: Johnathan Date: Tue, 31 Mar 2020 11:53:15 -0600 Subject: [PATCH 6/8] update INativeRobotDescription details in Data namespace --- .../net-sdk/mistyrobotics-common/data.md | 56 +++++++++++++++---- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/src/content/net-sdk/mistyrobotics-common/data.md b/src/content/net-sdk/mistyrobotics-common/data.md index 4ebfb3f7..fd825f52 100644 --- a/src/content/net-sdk/mistyrobotics-common/data.md +++ b/src/content/net-sdk/mistyrobotics-common/data.md @@ -554,7 +554,9 @@ public IEnumerable Image { get; set; } ## INativeRobotSkill -Configuration attributes and other details for a .NET skill. +Configuration attributes and other details for a .NET skill. Your skill sends this information to Misty when the robot loads the skill. + +### INativeRobotSkill Properties * `AllowedCleanupTimeInMs` (uint) - The amount of time (in milliseconds) given to perform cleanup tasks when a skill is cancelled or times out. When a skill ends, the system cannot restart that skill until after this time has elapsed. Default is 2000. Maximum is 10000. @@ -562,7 +564,7 @@ Configuration attributes and other details for a .NET skill. uint AllowedCleanupTimeInMs { get; set; } ``` -* `UniqueId` (Guid) - The unique id associated with this skill. You cannot start a skill from the robot unless that skill has a valid Guid associated with this property. +* `UniqueId` (Guid) - A unique identifier associated with this skill. You cannot start a skill from the robot unless that skill has a valid Guid associated with this `UniqueId` property. ```csharp Guid UniqueId { get; } @@ -574,7 +576,7 @@ Guid UniqueId { get; } string Name { get; } ``` -* `Description` (string) - An optional description for your skill. +* `Description` (string) - Optional text description of the skill. ```csharp string Description { get; set; } @@ -585,14 +587,48 @@ string Description { get; set; } ```csharp BroadcastMode BroadCastMode { get; set; } ``` + +* `StartupRules` (`IList`) - Setting that determines how a skill can start. + +```csharp +IList StartupRules { get; set; } +``` + +* `TimeoutInSeconds` (int) - How long (in seconds) this skill will run before it times out. Default is 600 seconds (10 minutes). + +```csharp +int TimeoutInSeconds { get; set; } +``` + +* `SharedStorageLifetime` (`SkillStorageLifetime`) - Setting that determines how long the system saves the shared data this skill creates. + +```csharp +SkillStorageLifetime SharedStorageLifetime { get; set; } +``` + +* `ReadPermissions` (`IList`) - A list of `UniqueId`s for each skill that is allowed to read the shared data this skill creates. If an empty list, any skill can read this skill's shared data. If an empty Guid, no other skills can read this skill's shared data. If the list includes one or more `UniqueId`s, only the skills associated with those `UniqueId`s can read this skill's shared data. A skill can always read the data it writes to its own shared data store. + +```csharp +IList ReadPermissions { get; set; } +``` + +* `WritePermissions` (`IList`) - A list of `UniqueId`s for each skill that is allowed to create, update, and remove the data in this skill's shared data store. If empty, any skill can write to this skill's shared data store. If an empty Guid, no other skills can write to this skill's shared data store. If the list includes one or more `UniqueId`s, only the skills associated with those `UniqueId`s can write to the data in this skills shared data store. A skill can always write to its own shared data store. + +```csharp +IList WritePermissions { get; set; } +``` -* `StartupRules` (`IList`) - -* `TimeoutInSeconds` (int) - -* `SharedStorageLifetime` (`SkillStorageLifetime`) - -* `ReadPermissions` (`IList`) - -* `WritePermissions` (`IList`) - -* `StartPermissions` (`IList`) - -* `TriggerPermissions` (`IList`) - +* `StartPermissions` (`IList`) - A list of `UniqueId`s for each skill that is allowed to start or cancel this skill. If empty, any skill can start or cancel this skill. If an empty Guid, no other skill can start or cancel this skill. If the list includes one or more `UniqueId`s, only the skills associated with those `UniqueId`s can start or stop this skill. + +```csharp +IList StartPermissions { get; set; } +``` + +* `TriggerPermissions` (`IList`) - A list of `UniqueId`s for each skill that is allowed to trigger user events in this skill. If empty, all other skills can trigger user events in this skill. If an empty Guid, no other skills can trigger user events in this skill. If the list includes or more `UniqueId`s, only those skills can trigger user events within this skill. A skill can always trigger user events in itself. + +```csharp +IList TriggerPermissions { get; set; } +``` ## INativeSkill From a8f7183fddec16443bfc555ff23af74a784b8b80 Mon Sep 17 00:00:00 2001 From: Johnathan Date: Wed, 1 Apr 2020 15:43:02 -0600 Subject: [PATCH 7/8] Add MapCell --- .../net-sdk/mistyrobotics-common/data.md | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/content/net-sdk/mistyrobotics-common/data.md b/src/content/net-sdk/mistyrobotics-common/data.md index fd825f52..03bd613d 100644 --- a/src/content/net-sdk/mistyrobotics-common/data.md +++ b/src/content/net-sdk/mistyrobotics-common/data.md @@ -630,12 +630,30 @@ IList StartPermissions { get; set; } IList TriggerPermissions { get; set; } ``` -## INativeSkill + + -## MapCell + + ## MapDetails +Information about a map. + +### MapDetails Properties + +* `Key` (string) - The map's unique key. Map keys are formatted as timestamps in UTC (for example, `Map_20190911_21.47.16.UTC`). You cannot change the value of the `Key` associated with a map. + +```csharp +public string Key { get; set; } +``` + +* `Name` (string) - The customizable string label for the map. You can change the value of the `Name` associated with a map. + +```csharp +public string Name { get; set; } +``` + ## MentalStateDetails ## NativeRobotSkill From c7d04ab19ff3510126405e49da33db1d8cc2c402 Mon Sep 17 00:00:00 2001 From: Johnathan Date: Wed, 1 Apr 2020 16:31:25 -0600 Subject: [PATCH 8/8] Add more Data class members --- .../net-sdk/mistyrobotics-common/data.md | 148 +++++++++++++++++- 1 file changed, 145 insertions(+), 3 deletions(-) diff --git a/src/content/net-sdk/mistyrobotics-common/data.md b/src/content/net-sdk/mistyrobotics-common/data.md index 03bd613d..31f73354 100644 --- a/src/content/net-sdk/mistyrobotics-common/data.md +++ b/src/content/net-sdk/mistyrobotics-common/data.md @@ -554,7 +554,9 @@ public IEnumerable Image { get; set; } ## INativeRobotSkill -Configuration attributes and other details for a .NET skill. Your skill sends this information to Misty when the robot loads the skill. +Interface for the [`NativeRobotSkill`](./#nativerobotskill) class. Configuration attributes and other details for a .NET skill. Your skill sends this information to Misty when the robot loads the skill. + +*Serializable* ### INativeRobotSkill Properties @@ -640,6 +642,8 @@ IList TriggerPermissions { get; set; } Information about a map. +*Serializable* + ### MapDetails Properties * `Key` (string) - The map's unique key. Map keys are formatted as timestamps in UTC (for example, `Map_20190911_21.47.16.UTC`). You cannot change the value of the `Key` associated with a map. @@ -654,12 +658,150 @@ public string Key { get; set; } public string Name { get; set; } ``` -## MentalStateDetails - + + + ## NativeRobotSkill +Configuration attributes and other details for a .NET skill. Your skill sends this information to Misty when the robot loads the skill. + +*Serializable* + +### NativeRobotSkill Properties + +* `AllowedCleanupTimeInMs` (uint) - The amount of time (in milliseconds) given to perform cleanup tasks when a skill is cancelled or times out. When a skill ends, the system cannot restart that skill until after this time has elapsed. Default is 2000. Maximum is 10000. + +```csharp +private uint _allowedCleanupTimeMs = 2000; + +public uint AllowedCleanupTimeInMs +{ + get + { + return _allowedCleanupTimeMs; + } + set + { + _allowedCleanupTimeMs = value <= 10000 ? value : 10000; + } +} +``` + +* `UniqueId` (Guid) - A unique identifier associated with this skill. You cannot start a skill from the robot unless that skill has a valid Guid associated with this `UniqueId` property. + +```csharp +public Guid UniqueId { get; private set; } +``` + +* `Name` (string) - A name of your choosing for the skill. The Skill Runner web page displays this name for the skill when connected to your robot. + +```csharp +public string Name { get; private set; } +``` + +* `Description` (string) - Optional text description of the skill. + +```csharp +public string Description { get; set; } +``` + +* `BroadcastMode` (`BroadcastMode`) - Setting that determines the content and frequency of messages this skill broadcasts to `SkillData` event listeners. + +```csharp +public BroadcastMode BroadCastMode { get; set; } = BroadcastMode.Off; +``` + +* `StartupRules` (`IList`) - Setting that determines how a skill can start. + +```csharp +public IList StartupRules { get; set; } = new List { NativeStartupRule.Manual }; +``` + +* `TimeoutInSeconds` (int) - How long (in seconds) this skill will run before it times out. Default is 600 seconds (10 minutes). + +```csharp +private int _timeout = 600; // 10 minute timeout + +public int TimeoutInSeconds +{ + get + { + return _timeout; + } + set + { + if(value > int.MaxValue) + { + _timeout = int.MaxValue; + } + else if(value < 0) + { + _timeout = 0; + } + else + { + _timeout = value; + } + } +} +``` + +* `SharedStorageLifetime` (`SkillStorageLifetime`) - Setting that determines how long the system saves the shared data this skill creates. + +```csharp +public SkillStorageLifetime SharedStorageLifetime { get; set; } = SkillStorageLifetime.LongTerm +``` + +* `ReadPermissions` (`IList`) - A list of `UniqueId`s for each skill that is allowed to read the shared data this skill creates. If an empty list, any skill can read this skill's shared data. If an empty Guid, no other skills can read this skill's shared data. If the list includes one or more `UniqueId`s, only the skills associated with those `UniqueId`s can read this skill's shared data. A skill can always read the data it writes to its own shared data store. + +```csharp +public IList ReadPermissions { get; set; } +``` + +* `WritePermissions` (`IList`) - A list of `UniqueId`s for each skill that is allowed to create, update, and remove the data in this skill's shared data store. If empty, any skill can write to this skill's shared data store. If an empty Guid, no other skills can write to this skill's shared data store. If the list includes one or more `UniqueId`s, only the skills associated with those `UniqueId`s can write to the data in this skills shared data store. A skill can always write to its own shared data store. + +```csharp +public IList WritePermissions { get; set; } +``` + +* `StartPermissions` (`IList`) - A list of `UniqueId`s for each skill that is allowed to start or cancel this skill. If empty, any skill can start or cancel this skill. If an empty Guid, no other skill can start or cancel this skill. If the list includes one or more `UniqueId`s, only the skills associated with those `UniqueId`s can start or stop this skill. + +```csharp +public IList StartPermissions { get; set; } +``` + +* `TriggerPermissions` (`IList`) - A list of `UniqueId`s for each skill that is allowed to trigger user events in this skill. If empty, all other skills can trigger user events in this skill. If an empty Guid, no other skills can trigger user events in this skill. If the list includes or more `UniqueId`s, only those skills can trigger user events within this skill. A skill can always trigger user events in itself. + +```csharp +public IList TriggerPermissions { get; set; } +``` + ## NativeValidation +Generic .NET Validation class. Validations are used to filter event messages from the robot. Generally, you should use event specific validations. + +*Serializable* + +### NativeValidation Properties + +* `Name` (string) - The name of the field to validate against. + +```csharp +public string Name { get; set; } +``` + +* `Value` (object) - The value to validate against. + +```csharp +public object Value { get; set; } +``` + +* `Comparison` (`ComparisonOperator`) - The operator to use when comparing the value. + +```csharp +public ComparisonOperator Compariso { get; set; } = ComparisonOperator.Equal; +``` + ## RecordedVideo ## RecordedVideoDetails