Skip to content

Commit

Permalink
1) Create ticket link to each RSCP tag entry added
Browse files Browse the repository at this point in the history
  • Loading branch information
jnk-cons committed Sep 22, 2023
1 parent d7e84de commit ffc4756
Show file tree
Hide file tree
Showing 17 changed files with 1,390 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ val tagsByHexString = mutableMapOf<String, Tag>()
*
* @since 2.0
*/
fun String.fromHexString() =
fun String.fromHexString(): ByteArray =
this
.removePrefix("0x")
.let {
Expand All @@ -93,7 +93,7 @@ fun String.fromHexString() =
*
* @since 2.0
*/
fun ByteArray.toHexString() =
fun ByteArray.toHexString(): String =
joinToString("") { String.format("%02x", it) }


Expand All @@ -106,7 +106,7 @@ fun ByteArray.toHexString() =
*
* @since 2.0
*/
fun ByteArray.crc32() =
fun ByteArray.crc32(): Long =
CRC32()
.also { it.update(this) }
.value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ data class Frame(
*
* @since 2.0
*/
fun containerByTag(tag: Tag, vararg containerPath: Tag) =
fun containerByTag(tag: Tag, vararg containerPath: Tag): List<Data> =
find(tag, data, *containerPath)
?.valueAsContainer(parser) ?: emptyList()

Expand Down Expand Up @@ -260,7 +260,7 @@ data class Frame(
*
* @since 2.0
*/
fun durationByTag(tag: Tag, vararg containerPath: Tag) =
fun durationByTag(tag: Tag, vararg containerPath: Tag): Duration =
instantByTag(tag, *containerPath)
.let { Duration.ofSeconds(it.epochSecond, it.nano.toLong()) }

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ enum class EPTag(

/**
* hex = "0x0B000003", type = DataType.NONE
*
* You know what the tag means or want to improve the tag description? Create a [Ticket](https://github.com/jnk-cons/easy-rscp/issues/new?title='Documentation+improvement+for+EPTag.REQ_IS_READY_FOR_SWITCH&labels=documentation&body=Documentation+update+for+enum+EPTag.REQ_IS_READY_FOR_SWITCH:).
*
* Original E3DC Documentation:
*
Expand All @@ -32,6 +34,8 @@ enum class EPTag(

/**
* hex = "0x0B000004", type = DataType.NONE
*
* You know what the tag means or want to improve the tag description? Create a [Ticket](https://github.com/jnk-cons/easy-rscp/issues/new?title='Documentation+improvement+for+EPTag.REQ_IS_GRID_CONNECTED&labels=documentation&body=Documentation+update+for+enum+EPTag.REQ_IS_GRID_CONNECTED:).
*
* Original E3DC Documentation:
*
Expand All @@ -43,6 +47,8 @@ enum class EPTag(

/**
* hex = "0x0B000005", type = DataType.NONE
*
* You know what the tag means or want to improve the tag description? Create a [Ticket](https://github.com/jnk-cons/easy-rscp/issues/new?title='Documentation+improvement+for+EPTag.REQ_IS_ISLAND_GRID&labels=documentation&body=Documentation+update+for+enum+EPTag.REQ_IS_ISLAND_GRID:).
*
* Original E3DC Documentation:
*
Expand All @@ -54,6 +60,8 @@ enum class EPTag(

/**
* hex = "0x0B000006", type = DataType.NONE
*
* You know what the tag means or want to improve the tag description? Create a [Ticket](https://github.com/jnk-cons/easy-rscp/issues/new?title='Documentation+improvement+for+EPTag.REQ_IS_INVALID_STATE&labels=documentation&body=Documentation+update+for+enum+EPTag.REQ_IS_INVALID_STATE:).
*
* Original E3DC Documentation:
*
Expand All @@ -65,6 +73,8 @@ enum class EPTag(

/**
* hex = "0x0B000007", type = DataType.NONE
*
* You know what the tag means or want to improve the tag description? Create a [Ticket](https://github.com/jnk-cons/easy-rscp/issues/new?title='Documentation+improvement+for+EPTag.REQ_IS_POSSIBLE&labels=documentation&body=Documentation+update+for+enum+EPTag.REQ_IS_POSSIBLE:).
*
* Original E3DC Documentation:
*
Expand All @@ -76,6 +86,8 @@ enum class EPTag(

/**
* hex = "0x0B800003", type = DataType.BOOL
*
* You know what the tag means or want to improve the tag description? Create a [Ticket](https://github.com/jnk-cons/easy-rscp/issues/new?title='Documentation+improvement+for+EPTag.IS_READY_FOR_SWITCH&labels=documentation&body=Documentation+update+for+enum+EPTag.IS_READY_FOR_SWITCH:).
*
* Original E3DC Documentation:
*
Expand All @@ -87,6 +99,8 @@ enum class EPTag(

/**
* hex = "0x0B800004", type = DataType.BOOL
*
* You know what the tag means or want to improve the tag description? Create a [Ticket](https://github.com/jnk-cons/easy-rscp/issues/new?title='Documentation+improvement+for+EPTag.IS_GRID_CONNECTED&labels=documentation&body=Documentation+update+for+enum+EPTag.IS_GRID_CONNECTED:).
*
* Original E3DC Documentation:
*
Expand All @@ -98,6 +112,8 @@ enum class EPTag(

/**
* hex = "0x0B800005", type = DataType.BOOL
*
* You know what the tag means or want to improve the tag description? Create a [Ticket](https://github.com/jnk-cons/easy-rscp/issues/new?title='Documentation+improvement+for+EPTag.IS_ISLAND_GRID&labels=documentation&body=Documentation+update+for+enum+EPTag.IS_ISLAND_GRID:).
*
* Original E3DC Documentation:
*
Expand All @@ -109,6 +125,8 @@ enum class EPTag(

/**
* hex = "0x0B800006", type = DataType.BOOL
*
* You know what the tag means or want to improve the tag description? Create a [Ticket](https://github.com/jnk-cons/easy-rscp/issues/new?title='Documentation+improvement+for+EPTag.IS_INVALID_STATE&labels=documentation&body=Documentation+update+for+enum+EPTag.IS_INVALID_STATE:).
*
* Original E3DC Documentation:
*
Expand All @@ -120,6 +138,8 @@ enum class EPTag(

/**
* hex = "0x0B800007", type = DataType.BOOL
*
* You know what the tag means or want to improve the tag description? Create a [Ticket](https://github.com/jnk-cons/easy-rscp/issues/new?title='Documentation+improvement+for+EPTag.IS_POSSIBLE&labels=documentation&body=Documentation+update+for+enum+EPTag.IS_POSSIBLE:).
*
* Original E3DC Documentation:
*
Expand All @@ -131,6 +151,8 @@ enum class EPTag(

/**
* hex = "0x0BFFFFFF", type = DataType.CONTAINER
*
* You know what the tag means or want to improve the tag description? Create a [Ticket](https://github.com/jnk-cons/easy-rscp/issues/new?title='Documentation+improvement+for+EPTag.GENERAL_ERROR&labels=documentation&body=Documentation+update+for+enum+EPTag.GENERAL_ERROR:).
*
* Original E3DC Documentation:
*
Expand All @@ -141,4 +163,4 @@ enum class EPTag(
GENERAL_ERROR(hex = "0x0BFFFFFF", type = DataType.CONTAINER),


}
}
Loading

0 comments on commit ffc4756

Please sign in to comment.