| 1 |
from typing import ClassVar as _ClassVar |
| 2 |
from typing import Iterable as _Iterable |
| 3 |
from typing import Mapping as _Mapping |
| 4 |
from typing import Optional as _Optional |
| 5 |
from typing import Union as _Union |
| 6 |
|
| 7 |
from google.protobuf import descriptor as _descriptor |
| 8 |
from google.protobuf import message as _message |
| 9 |
from google.protobuf.internal import containers as _containers |
| 10 |
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper |
| 11 |
|
| 12 |
DESCRIPTOR: _descriptor.FileDescriptor |
| 13 |
|
| 14 |
class OpCode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): |
| 15 |
__slots__ = () |
| 16 |
RESET: _ClassVar[OpCode] |
| 17 |
INIT: _ClassVar[OpCode] |
| 18 |
|
| 19 |
class FwType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): |
| 20 |
__slots__ = () |
| 21 |
APPLICATION: _ClassVar[FwType] |
| 22 |
SOFTDEVICE: _ClassVar[FwType] |
| 23 |
BOOTLOADER: _ClassVar[FwType] |
| 24 |
SOFTDEVICE_BOOTLOADER: _ClassVar[FwType] |
| 25 |
EXTERNAL_APPLICATION: _ClassVar[FwType] |
| 26 |
|
| 27 |
class HashType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): |
| 28 |
__slots__ = () |
| 29 |
NO_HASH: _ClassVar[HashType] |
| 30 |
CRC: _ClassVar[HashType] |
| 31 |
SHA128: _ClassVar[HashType] |
| 32 |
SHA256: _ClassVar[HashType] |
| 33 |
SHA512: _ClassVar[HashType] |
| 34 |
|
| 35 |
class ValidationType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): |
| 36 |
__slots__ = () |
| 37 |
NO_VALIDATION: _ClassVar[ValidationType] |
| 38 |
VALIDATE_GENERATED_CRC: _ClassVar[ValidationType] |
| 39 |
VALIDATE_SHA256: _ClassVar[ValidationType] |
| 40 |
VALIDATE_ECDSA_P256_SHA256: _ClassVar[ValidationType] |
| 41 |
|
| 42 |
class SignatureType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): |
| 43 |
__slots__ = () |
| 44 |
ECDSA_P256_SHA256: _ClassVar[SignatureType] |
| 45 |
ED25519: _ClassVar[SignatureType] |
| 46 |
|
| 47 |
RESET: OpCode |
| 48 |
INIT: OpCode |
| 49 |
APPLICATION: FwType |
| 50 |
SOFTDEVICE: FwType |
| 51 |
BOOTLOADER: FwType |
| 52 |
SOFTDEVICE_BOOTLOADER: FwType |
| 53 |
EXTERNAL_APPLICATION: FwType |
| 54 |
NO_HASH: HashType |
| 55 |
CRC: HashType |
| 56 |
SHA128: HashType |
| 57 |
SHA256: HashType |
| 58 |
SHA512: HashType |
| 59 |
NO_VALIDATION: ValidationType |
| 60 |
VALIDATE_GENERATED_CRC: ValidationType |
| 61 |
VALIDATE_SHA256: ValidationType |
| 62 |
VALIDATE_ECDSA_P256_SHA256: ValidationType |
| 63 |
ECDSA_P256_SHA256: SignatureType |
| 64 |
ED25519: SignatureType |
| 65 |
|
| 66 |
class Hash(_message.Message): |
| 67 |
__slots__ = ("hash_type", "hash") |
| 68 |
HASH_TYPE_FIELD_NUMBER: _ClassVar[int] |
| 69 |
HASH_FIELD_NUMBER: _ClassVar[int] |
| 70 |
hash_type: HashType |
| 71 |
hash: bytes |
| 72 |
def __init__( |
| 73 |
self, hash_type: _Optional[_Union[HashType, str]] = ..., hash: _Optional[bytes] = ... |
| 74 |
) -> None: ... |
| 75 |
|
| 76 |
class BootValidation(_message.Message): |
| 77 |
__slots__ = ("type", "bytes_") |
| 78 |
TYPE_FIELD_NUMBER: _ClassVar[int] |
| 79 |
BYTES__FIELD_NUMBER: _ClassVar[int] |
| 80 |
type: ValidationType |
| 81 |
bytes_: bytes |
| 82 |
def __init__( |
| 83 |
self, type: _Optional[_Union[ValidationType, str]] = ..., bytes_: _Optional[bytes] = ... |
| 84 |
) -> None: ... |
| 85 |
|
| 86 |
class InitCommand(_message.Message): |
| 87 |
__slots__ = ( |
| 88 |
"fw_version", |
| 89 |
"hw_version", |
| 90 |
"sd_req", |
| 91 |
"type", |
| 92 |
"sd_size", |
| 93 |
"bl_size", |
| 94 |
"app_size", |
| 95 |
"hash", |
| 96 |
"is_debug", |
| 97 |
"boot_validation", |
| 98 |
) |
| 99 |
FW_VERSION_FIELD_NUMBER: _ClassVar[int] |
| 100 |
HW_VERSION_FIELD_NUMBER: _ClassVar[int] |
| 101 |
SD_REQ_FIELD_NUMBER: _ClassVar[int] |
| 102 |
TYPE_FIELD_NUMBER: _ClassVar[int] |
| 103 |
SD_SIZE_FIELD_NUMBER: _ClassVar[int] |
| 104 |
BL_SIZE_FIELD_NUMBER: _ClassVar[int] |
| 105 |
APP_SIZE_FIELD_NUMBER: _ClassVar[int] |
| 106 |
HASH_FIELD_NUMBER: _ClassVar[int] |
| 107 |
IS_DEBUG_FIELD_NUMBER: _ClassVar[int] |
| 108 |
BOOT_VALIDATION_FIELD_NUMBER: _ClassVar[int] |
| 109 |
fw_version: int |
| 110 |
hw_version: int |
| 111 |
sd_req: _containers.RepeatedScalarFieldContainer[int] |
| 112 |
type: FwType |
| 113 |
sd_size: int |
| 114 |
bl_size: int |
| 115 |
app_size: int |
| 116 |
hash: Hash |
| 117 |
is_debug: bool |
| 118 |
boot_validation: _containers.RepeatedCompositeFieldContainer[BootValidation] |
| 119 |
def __init__( |
| 120 |
self, |
| 121 |
fw_version: _Optional[int] = ..., |
| 122 |
hw_version: _Optional[int] = ..., |
| 123 |
sd_req: _Optional[_Iterable[int]] = ..., |
| 124 |
type: _Optional[_Union[FwType, str]] = ..., |
| 125 |
sd_size: _Optional[int] = ..., |
| 126 |
bl_size: _Optional[int] = ..., |
| 127 |
app_size: _Optional[int] = ..., |
| 128 |
hash: _Optional[_Union[Hash, _Mapping]] = ..., # type: ignore[type-arg] |
| 129 |
is_debug: bool = ..., |
| 130 |
boot_validation: _Optional[_Iterable[_Union[BootValidation, _Mapping]]] = ..., # type: ignore[type-arg] |
| 131 |
) -> None: ... |
| 132 |
|
| 133 |
class ResetCommand(_message.Message): |
| 134 |
__slots__ = ("timeout",) |
| 135 |
TIMEOUT_FIELD_NUMBER: _ClassVar[int] |
| 136 |
timeout: int |
| 137 |
def __init__(self, timeout: _Optional[int] = ...) -> None: ... |
| 138 |
|
| 139 |
class Command(_message.Message): |
| 140 |
__slots__ = ("op_code", "init", "reset") |
| 141 |
OP_CODE_FIELD_NUMBER: _ClassVar[int] |
| 142 |
INIT_FIELD_NUMBER: _ClassVar[int] |
| 143 |
RESET_FIELD_NUMBER: _ClassVar[int] |
| 144 |
op_code: OpCode |
| 145 |
init: InitCommand |
| 146 |
reset: ResetCommand |
| 147 |
def __init__( |
| 148 |
self, |
| 149 |
op_code: _Optional[_Union[OpCode, str]] = ..., |
| 150 |
init: _Optional[_Union[InitCommand, _Mapping]] = ..., # type: ignore[type-arg] |
| 151 |
reset: _Optional[_Union[ResetCommand, _Mapping]] = ..., # type: ignore[type-arg] |
| 152 |
) -> None: ... |
| 153 |
|
| 154 |
class SignedCommand(_message.Message): |
| 155 |
__slots__ = ("command", "signature_type", "signature") |
| 156 |
COMMAND_FIELD_NUMBER: _ClassVar[int] |
| 157 |
SIGNATURE_TYPE_FIELD_NUMBER: _ClassVar[int] |
| 158 |
SIGNATURE_FIELD_NUMBER: _ClassVar[int] |
| 159 |
command: Command |
| 160 |
signature_type: SignatureType |
| 161 |
signature: bytes |
| 162 |
def __init__( |
| 163 |
self, |
| 164 |
command: _Optional[_Union[Command, _Mapping]] = ..., # type: ignore[type-arg] |
| 165 |
signature_type: _Optional[_Union[SignatureType, str]] = ..., |
| 166 |
signature: _Optional[bytes] = ..., |
| 167 |
) -> None: ... |
| 168 |
|
| 169 |
class Packet(_message.Message): |
| 170 |
__slots__ = ("command", "signed_command") |
| 171 |
COMMAND_FIELD_NUMBER: _ClassVar[int] |
| 172 |
SIGNED_COMMAND_FIELD_NUMBER: _ClassVar[int] |
| 173 |
command: Command |
| 174 |
signed_command: SignedCommand |
| 175 |
def __init__( |
| 176 |
self, |
| 177 |
command: _Optional[_Union[Command, _Mapping]] = ..., # type: ignore[type-arg] |
| 178 |
signed_command: _Optional[_Union[SignedCommand, _Mapping]] = ..., # type: ignore[type-arg] |
| 179 |
) -> None: ... |