Skip to content

Commit

Permalink
api: Add CipherEnum
Browse files Browse the repository at this point in the history
  • Loading branch information
halimi committed Aug 20, 2024
1 parent 37786cf commit a4491f9
Show file tree
Hide file tree
Showing 9 changed files with 1,735 additions and 1,274 deletions.
32 changes: 29 additions & 3 deletions api/ttn/lorawan/v3/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@
- [Enum `ADRAckLimitExponent`](#ttn.lorawan.v3.ADRAckLimitExponent)
- [Enum `AggregatedDutyCycle`](#ttn.lorawan.v3.AggregatedDutyCycle)
- [Enum `CFListType`](#ttn.lorawan.v3.CFListType)
- [Enum `CipherEnum`](#ttn.lorawan.v3.CipherEnum)
- [Enum `Class`](#ttn.lorawan.v3.Class)
- [Enum `DataRateIndex`](#ttn.lorawan.v3.DataRateIndex)
- [Enum `DataRateOffset`](#ttn.lorawan.v3.DataRateOffset)
Expand Down Expand Up @@ -7778,24 +7779,28 @@ Only the components for which the keys were meant, will have the key-encryption-
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `minor_version` | [`Minor`](#ttn.lorawan.v3.Minor) | | |
| `cipher` | [`CipherEnum`](#ttn.lorawan.v3.CipherEnum) | | |

#### Field Rules

| Field | Validations |
| ----- | ----------- |
| `minor_version` | <p>`enum.defined_only`: `true`</p><p>`enum.in`: `[1]`</p> |
| `minor_version` | <p>`enum.defined_only`: `true`</p><p>`enum.in`: `[1 2]`</p> |
| `cipher` | <p>`enum.defined_only`: `true`</p> |

### <a name="ttn.lorawan.v3.MACCommand.ResetInd">Message `MACCommand.ResetInd`</a>

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `minor_version` | [`Minor`](#ttn.lorawan.v3.Minor) | | |
| `cipher` | [`CipherEnum`](#ttn.lorawan.v3.CipherEnum) | | |

#### Field Rules

| Field | Validations |
| ----- | ----------- |
| `minor_version` | <p>`enum.defined_only`: `true`</p><p>`enum.in`: `[1]`</p> |
| `minor_version` | <p>`enum.defined_only`: `true`</p><p>`enum.in`: `[1 2]`</p> |
| `cipher` | <p>`enum.defined_only`: `true`</p> |

### <a name="ttn.lorawan.v3.MACCommand.RxParamSetupAns">Message `MACCommand.RxParamSetupAns`</a>

Expand Down Expand Up @@ -8208,6 +8213,27 @@ Transmission settings for downlink.
| `FREQUENCIES` | 0 | |
| `CHANNEL_MASKS` | 1 | |

### <a name="ttn.lorawan.v3.CipherEnum">Enum `CipherEnum`</a>

| Name | Number | Description |
| ---- | ------ | ----------- |
| `CIPHER_0` | 0 | |
| `CIPHER_1` | 1 | |
| `CIPHER_2` | 2 | |
| `CIPHER_3` | 3 | |
| `CIPHER_4` | 4 | |
| `CIPHER_5` | 5 | |
| `CIPHER_6` | 6 | |
| `CIPHER_7` | 7 | |
| `CIPHER_8` | 8 | |
| `CIPHER_9` | 9 | |
| `CIPHER_10` | 10 | |
| `CIPHER_11` | 11 | |
| `CIPHER_12` | 12 | |
| `CIPHER_13` | 13 | |
| `CIPHER_14` | 14 | |
| `CIPHER_15` | 15 | |

### <a name="ttn.lorawan.v3.Class">Enum `Class`</a>

| Name | Number | Description |
Expand Down Expand Up @@ -8350,7 +8376,7 @@ Transmission settings for downlink.
| ---- | ------ | ----------- |
| `MINOR_RFU_0` | 0 | |
| `MINOR_1` | 1 | |
| `MINOR_RFU_2` | 2 | |
| `MINOR_2` | 2 | |
| `MINOR_RFU_3` | 3 | |
| `MINOR_RFU_4` | 4 | |
| `MINOR_RFU_5` | 5 | |
Expand Down
30 changes: 29 additions & 1 deletion api/ttn/lorawan/v3/api.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -18232,6 +18232,9 @@
"properties": {
"minor_version": {
"$ref": "#/definitions/v3Minor"
},
"cipher": {
"$ref": "#/definitions/v3CipherEnum"
}
}
},
Expand All @@ -18240,6 +18243,9 @@
"properties": {
"minor_version": {
"$ref": "#/definitions/v3Minor"
},
"cipher": {
"$ref": "#/definitions/v3CipherEnum"
}
}
},
Expand Down Expand Up @@ -21724,6 +21730,28 @@
},
"description": "DEPRECATED: This message is deprecated and will be removed in a future version of The Things Stack."
},
"v3CipherEnum": {
"type": "string",
"enum": [
"CIPHER_0",
"CIPHER_1",
"CIPHER_2",
"CIPHER_3",
"CIPHER_4",
"CIPHER_5",
"CIPHER_6",
"CIPHER_7",
"CIPHER_8",
"CIPHER_9",
"CIPHER_10",
"CIPHER_11",
"CIPHER_12",
"CIPHER_13",
"CIPHER_14",
"CIPHER_15"
],
"default": "CIPHER_0"
},
"v3ClaimEndDeviceRequest": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -26774,7 +26802,7 @@
"enum": [
"MINOR_RFU_0",
"MINOR_1",
"MINOR_RFU_2",
"MINOR_2",
"MINOR_RFU_3",
"MINOR_RFU_4",
"MINOR_RFU_5",
Expand Down
32 changes: 29 additions & 3 deletions api/ttn/lorawan/v3/lorawan.proto
Original file line number Diff line number Diff line change
Expand Up @@ -937,14 +937,16 @@ message MACCommand {
message ResetInd {
Minor minor_version = 1 [(validate.rules).enum = {
defined_only: true,
in: [1]
in: [1, 2]
}];
CipherEnum cipher = 2 [(validate.rules).enum.defined_only = true];
}
message ResetConf {
Minor minor_version = 1 [(validate.rules).enum = {
defined_only: true,
in: [1]
in: [1, 2]
}];
CipherEnum cipher = 2 [(validate.rules).enum.defined_only = true];
}
message LinkCheckAns {
// Indicates the link margin in dB of the received LinkCheckReq, relative to the demodulation floor.
Expand Down Expand Up @@ -1438,7 +1440,7 @@ enum Minor {

MINOR_RFU_0 = 0;
MINOR_1 = 1;
MINOR_RFU_2 = 2;
MINOR_2 = 2;
MINOR_RFU_3 = 3;
MINOR_RFU_4 = 4;
MINOR_RFU_5 = 5;
Expand All @@ -1454,6 +1456,30 @@ enum Minor {
MINOR_RFU_15 = 15;
}

enum CipherEnum {
option (thethings.json.enum) = {
marshal_as_string: true,
prefix: "CIPHER"
};

CIPHER_0 = 0;
CIPHER_1 = 1;
CIPHER_2 = 2;
CIPHER_3 = 3;
CIPHER_4 = 4;
CIPHER_5 = 5;
CIPHER_6 = 6;
CIPHER_7 = 7;
CIPHER_8 = 8;
CIPHER_9 = 9;
CIPHER_10 = 10;
CIPHER_11 = 11;
CIPHER_12 = 12;
CIPHER_13 = 13;
CIPHER_14 = 14;
CIPHER_15 = 15;
}

message FrequencyValue {
option (thethings.flags.message) = {
select: true,
Expand Down
Loading

0 comments on commit a4491f9

Please sign in to comment.