Lines Matching refs:self
116 def __init__(self, address): argument
117 self._address = address
120 def address(self): argument
121 return self._address
123 def __eq__(self, other): argument
124 common.expect_the_same_class(self, other)
126 return self.address == other.address
128 def __repr__(self): argument
129 return "SourceAddress(address={})".format(hex(self._address))
134 def parse(self, data, message_info): argument
141 def __init__(self, receiver, secure, device_type, network_data): argument
142 self._receiver = receiver
143 self._secure = secure
144 self._device_type = device_type
145 self._network_data = network_data
148 def receiver(self): argument
149 return self._receiver
152 def secure(self): argument
153 return self._secure
156 def device_type(self): argument
157 return self._device_type
160 def network_data(self): argument
161 return self._network_data
163 def __eq__(self, other): argument
164 common.expect_the_same_class(self, other)
166 return (self.receiver == other.receiver and self.secure == other.secure and
167 self.device_type == other.device_type and self.network_data == other.network_data)
169 def __repr__(self): argument
171 self.receiver, self.secure, self.device_type, self.network_data)
176 def parse(self, data, message_info): argument
187 def __init__(self, timeout): argument
188 self._timeout = timeout
191 def timeout(self): argument
192 return self._timeout
194 def __eq__(self, other): argument
195 common.expect_the_same_class(self, other)
197 return self.timeout == other.timeout
199 def __repr__(self): argument
200 return "Timeout(timeout={})".format(self.timeout)
205 def parse(self, data, message_info): argument
212 def __init__(self, challenge): argument
213 self._challenge = challenge
216 def challenge(self): argument
217 return self._challenge
219 def __eq__(self, other): argument
220 common.expect_the_same_class(self, other)
222 return self.challenge == other.challenge
224 def __repr__(self): argument
225 return "Challenge(challenge={})".format(hexlify(self.challenge))
230 def parse(self, data, message_info): argument
237 def __init__(self, response): argument
238 self._response = response
241 def response(self): argument
242 return self._response
244 def __eq__(self, other): argument
245 common.expect_the_same_class(self, other)
247 return self.response == other.response
249 def __repr__(self): argument
250 return "Response(response={})".format(hexlify(self.response))
255 def parse(self, data, message_info): argument
262 def __init__(self, frame_counter): argument
263 self._frame_counter = frame_counter
266 def frame_counter(self): argument
267 return self._frame_counter
269 def __eq__(self, other): argument
270 common.expect_the_same_class(self, other)
272 return self.frame_counter == other.frame_counter
274 def __repr__(self): argument
275 return "LinkLayerFrameCounter(frame_counter={})".format(self.frame_counter)
280 def parse(self, data, message_info): argument
287 def __init__(self, frame_counter): argument
288 self._frame_counter = frame_counter
291 def frame_counter(self): argument
292 return self._frame_counter
294 def __eq__(self, other): argument
295 common.expect_the_same_class(self, other)
297 return self.frame_counter == other.frame_counter
299 def __repr__(self): argument
300 return "MleFrameCounter(frame_counter={})".format(self.frame_counter)
305 def parse(self, data, message_info): argument
312 def __init__(self, output, _input, route): argument
313 self._output = output
314 self._input = _input
315 self._route = route
318 def output(self): argument
319 return self._output
322 def input(self): argument
323 return self._input
326 def route(self): argument
327 return self._route
329 def __eq__(self, other): argument
330 common.expect_the_same_class(self, other)
332 … return (self.output == other.output and self.input == other.input and self.route == other.route)
334 def __repr__(self): argument
335 …LinkQualityAndRouteData(output={}, input={}, route={})".format(self.output, self.input, self.route)
340 def parse(self, data, message_info): argument
350 def __init__(self, id_sequence, router_id_mask, link_quality_and_route_data): argument
351 self._id_sequence = id_sequence
352 self._router_id_mask = router_id_mask
353 self._link_quality_and_route_data = link_quality_and_route_data
356 def id_sequence(self): argument
357 return self._id_sequence
360 def router_id_mask(self): argument
361 return self._router_id_mask
364 def link_quality_and_route_data(self): argument
365 return self._link_quality_and_route_data
367 def __eq__(self, other): argument
368 common.expect_the_same_class(self, other)
370 … return (self.id_sequence == other.id_sequence and self.router_id_mask == other.router_id_mask and
371 self.link_quality_and_route_data == other.link_quality_and_route_data)
373 def __repr__(self): argument
374 lqrd_str = ", ".join(["{}".format(lqrd) for lqrd in self.link_quality_and_route_data])
376 self.id_sequence, hex(self.router_id_mask), lqrd_str)
381 def __init__(self, link_quality_and_route_data_factory): argument
382 self._lqrd_factory = link_quality_and_route_data_factory
384 def parse(self, data, message_info): argument
391 link_quality_and_route_data.append(self._lqrd_factory.parse(data, message_info))
398 def __init__(self, address): argument
399 self._address = address
402 def address(self): argument
403 return self._address
405 def __eq__(self, other): argument
406 common.expect_the_same_class(self, other)
408 return self.address == other.address
410 def __repr__(self): argument
411 return "Address16(address={})".format(hex(self.address))
416 def parse(self, data, message_info): argument
424 self, argument
431 self._partition_id = partition_id
432 self._weighting = weighting
433 self._data_version = data_version
434 self._stable_data_version = stable_data_version
435 self._leader_router_id = leader_router_id
438 def partition_id(self): argument
439 return self._partition_id
442 def weighting(self): argument
443 return self._weighting
446 def data_version(self): argument
447 return self._data_version
450 def stable_data_version(self): argument
451 return self._stable_data_version
454 def leader_router_id(self): argument
455 return self._leader_router_id
457 def __eq__(self, other): argument
458 common.expect_the_same_class(self, other)
460 return (self.partition_id == other.partition_id and self.weighting == other.weighting and
461 …self.data_version == other.data_version and self.stable_data_version == other.stable_data_version …
462 self.leader_router_id == other.leader_router_id)
464 def __repr__(self): argument
466 self.partition_id,
467 self.weighting,
468 self.data_version,
469 self.stable_data_version,
470 self.leader_router_id,
476 def parse(self, data, message_info): argument
493 def __init__(self, tlvs): argument
494 self._tlvs = tlvs
497 def tlvs(self): argument
498 return self._tlvs
500 def __eq__(self, other): argument
501 common.expect_the_same_class(self, other)
503 return self.tlvs == other.tlvs
505 def __repr__(self): argument
506 tlvs_str = ", ".join(["{}".format(tlv) for tlv in self.tlvs])
512 def __init__(self, network_data_tlvs_factory): argument
513 self._tlvs_factory = network_data_tlvs_factory
515 def parse(self, data, message_info): argument
516 tlvs = self._tlvs_factory.parse(data, message_info)
522 def __init__(self, tlvs): argument
523 self._tlvs = tlvs
526 def tlvs(self): argument
527 return self._tlvs
529 def __eq__(self, other): argument
530 common.expect_the_same_class(self, other)
532 return self.tlvs == other.tlvs
534 def __repr__(self): argument
535 tlvs_str = ", ".join(["{}".format(tlv) for tlv in self.tlvs])
541 def parse(self, data, message_info): argument
548 def __init__(self, router, end_device): argument
549 self._router = router
550 self._end_device = end_device
553 def router(self): argument
554 return self._router
557 def end_device(self): argument
558 return self._end_device
560 def __eq__(self, other): argument
561 common.expect_the_same_class(self, other)
563 return (self.router == other.router and self.end_device == other.end_device)
565 def __repr__(self): argument
566 return "ScanMask(router={}, end_device={})".format(self.router, self.end_device)
571 def parse(self, data, message_info): argument
581 self, argument
592 self._pp_byte = pp_byte
593 self._link_quality_3 = link_quality_3
594 self._link_quality_2 = link_quality_2
595 self._link_quality_1 = link_quality_1
596 self._leader_cost = leader_cost
597 self._id_sequence = id_sequence
598 self._active_routers = active_routers
599 self._sed_buffer_size = sed_buffer_size
600 self._sed_datagram_count = sed_datagram_count
603 def pp_byte(self): argument
604 return self._pp_byte
607 def pp(self): argument
608 return common.map_pp(self._pp_byte)
611 def link_quality_3(self): argument
612 return self._link_quality_3
615 def link_quality_2(self): argument
616 return self._link_quality_2
619 def link_quality_1(self): argument
620 return self._link_quality_1
623 def leader_cost(self): argument
624 return self._leader_cost
627 def id_sequence(self): argument
628 return self._id_sequence
631 def active_routers(self): argument
632 return self._active_routers
635 def sed_buffer_size(self): argument
636 return self._sed_buffer_size
639 def sed_datagram_count(self): argument
640 return self._sed_datagram_count
642 def __eq__(self, other): argument
643 common.expect_the_same_class(self, other)
645 return (self.pp == other.pp and self.link_quality_3 == other.link_quality_3 and
646 … self.link_quality_2 == other.link_quality_2 and self.link_quality_1 == other.link_quality_1 and
647 self.leader_cost == other.leader_cost and self.id_sequence == other.id_sequence and
648 … self.active_routers == other.active_routers and self.sed_buffer_size == other.sed_buffer_size and
649 self.sed_datagram_count == other.sed_datagram_count)
651 def __repr__(self): argument
661 self.pp,
662 self.link_quality_3,
663 self.link_quality_2,
664 self.link_quality_1,
665 self.leader_cost,
666 self.id_sequence,
667 self.active_routers,
668 self.sed_buffer_size,
669 self.sed_datagram_count,
675 def parse(self, data, message_info): argument
708 def __init__(self, link_margin): argument
709 self._link_margin = link_margin
712 def link_margin(self): argument
713 return self._link_margin
715 def __eq__(self, other): argument
716 common.expect_the_same_class(self, other)
718 return self.link_margin == other.link_margin
720 def __repr__(self): argument
721 return "LinkMargin(link_margin={})".format(self.link_margin)
726 def parse(self, data, message_info): argument
733 def __init__(self, status): argument
734 self._status = status
737 def status(self): argument
738 return self._status
740 def __eq__(self, other): argument
741 common.expect_the_same_class(self, other)
743 return self.status == other.status
745 def __repr__(self): argument
746 return "Status(status={})".format(self.status)
751 def parse(self, data, message_info): argument
758 def __init__(self, version): argument
759 self._version = version
762 def version(self): argument
763 return self._version
765 def __eq__(self, other): argument
766 common.expect_the_same_class(self, other)
768 return self.version == other.version
770 def __repr__(self): argument
771 return "Version(version={})".format(self.version)
776 def parse(self, data, message_info): argument
783 def __init__(self, ipv6_address): argument
784 self._ipv6_address = ipv6_address
787 def ipv6_address(self): argument
788 return self._ipv6_address
790 def __eq__(self, other): argument
791 common.expect_the_same_class(self, other)
793 return self.ipv6_address == other.ipv6_address
795 def __repr__(self): argument
796 return "AddressFull(ipv6_address={}')".format(hexlify(self.ipv6_address))
801 def parse(self, data, message_info): argument
809 def __init__(self, cid, iid): argument
810 self._cid = cid
811 self._iid = iid
814 def cid(self): argument
815 return self._cid
818 def iid(self): argument
819 return self._iid
821 def __eq__(self, other): argument
822 common.expect_the_same_class(self, other)
824 return self.cid == other.cid and self.iid == other.iid
826 def __repr__(self): argument
827 return "AddressCompressed(cid={}, iid={}')".format(self.cid, hexlify(self.iid))
832 def parse(self, data, message_info): argument
840 def __init__(self, addresses): argument
841 self._addresses = addresses
844 def addresses(self): argument
845 return self._addresses
847 def __eq__(self, other): argument
848 common.expect_the_same_class(self, other)
850 return self.addresses == other.addresses
852 def __repr__(self): argument
853 addresses_str = ", ".join(["{}".format(address) for address in self.addresses])
859 def __init__(self, addr_compressed_factory, addr_full_factory): argument
860 self._addr_compressed_factory = addr_compressed_factory
861 self._addr_full_factory = addr_full_factory
863 def parse(self, data, message_info): argument
871 addresses.append(self._addr_compressed_factory.parse(data, message_info))
873 addresses.append(self._addr_full_factory.parse(data, message_info))
880 def __init__(self, channel_page, channel): argument
881 self._channel_page = channel_page
882 self._channel = channel
885 def channel_page(self): argument
886 return self._channel_page
889 def channel(self): argument
890 return self._channel
892 def __eq__(self, other): argument
893 common.expect_the_same_class(self, other)
895 return (self.channel_page == other.channel_page and self.channel == other.channel)
897 def __repr__(self): argument
898 return "Channel(channel_page={}, channel={})".format(self.channel_page, self.channel)
903 def parse(self, data, message_info): argument
911 def __init__(self, pan_id): argument
912 self._pan_id = pan_id
915 def pan_id(self): argument
916 return self._pan_id
918 def __eq__(self, other): argument
919 common.expect_the_same_class(self, other)
921 return self.pan_id == other.pan_id
923 def __repr__(self): argument
924 return "PanId(pan_id={})".format(self.pan_id)
929 def parse(self, data, message_info): argument
936 def __init__(self, timestamp_seconds, timestamp_ticks, u): argument
937 self._timestamp_seconds = timestamp_seconds
938 self._timestamp_ticks = timestamp_ticks
939 self._u = u
942 def timestamp_seconds(self): argument
943 return self._timestamp_seconds
946 def timestamp_ticks(self): argument
947 return self._timestamp_ticks
950 def u(self): argument
951 return self._u
953 def __eq__(self, other): argument
954 common.expect_the_same_class(self, other)
956 …return (self.timestamp_seconds == other.timestamp_seconds and self.timestamp_ticks == other.timest…
957 self.u == other.u)
959 def __repr__(self): argument
961 self.timestamp_seconds, self.timestamp_ticks, self.u)
966 def parse(self, data, message_info): argument
978 def __init__(self, timestamp_seconds, timestamp_ticks, u): argument
979 self._timestamp_seconds = timestamp_seconds
980 self._timestamp_ticks = timestamp_ticks
981 self._u = u
984 def timestamp_seconds(self): argument
985 return self._timestamp_seconds
988 def timestamp_ticks(self): argument
989 return self._timestamp_ticks
992 def u(self): argument
993 return self._u
995 def __eq__(self, other): argument
996 common.expect_the_same_class(self, other)
998 …return (self.timestamp_seconds == other.timestamp_seconds and self.timestamp_ticks == other.timest…
999 self.u == other.u)
1001 def __repr__(self): argument
1003 self.timestamp_seconds, self.timestamp_ticks, self.u)
1008 def parse(self, data, message_info): argument
1021 def __init__(self): argument
1027 def parse(self, data, message_info): argument
1034 def __init__(self): argument
1040 def parse(self, data, message_info): argument
1046 def __init__(self, tlvs): argument
1047 self._tlvs = tlvs
1050 def tlvs(self): argument
1051 return self._tlvs
1053 def __eq__(self, other): argument
1054 return self.tlvs == other.tlvs
1056 def __repr__(self): argument
1057 return "ThreadDiscovery(tlvs={})".format(self.tlvs)
1062 def __init__(self, thread_discovery_tlvs_factory): argument
1063 self._tlvs_factory = thread_discovery_tlvs_factory
1065 def parse(self, data, message_info): argument
1066 tlvs = self._tlvs_factory.parse(data, message_info)
1073 def __init__(self): argument
1080 def parse(self, data, message_info): argument
1087 def __init__(self): argument
1093 def parse(self, data, message_info): argument
1100 def __init__(self): argument
1106 def parse(self, data, message_info): argument
1113 def __init__(self): argument
1119 def parse(self, data, message_info): argument
1126 def __init__(self): argument
1132 def parse(self, data, message_info): argument
1139 def __init__(self): argument
1145 def parse(self, data, message_info): argument
1152 def __init__(self): argument
1158 def parse(self, data, message_info): argument
1165 def __init__(self): argument
1171 def parse(self, data, message_info): argument
1178 def __init__(self): argument
1184 def parse(self, data, message_info): argument
1190 def __init__(self, _type, tlvs): argument
1191 self._type = _type
1192 self._tlvs = tlvs
1195 def type(self): argument
1196 return self._type
1199 def tlvs(self): argument
1200 return self._tlvs
1202 def __repr__(self): argument
1203 tlvs_str = ", ".join(["{}".format(tlv) for tlv in self.tlvs])
1204 return "MleCommand(type={}, tlvs=[{}])".format(self.type.name, tlvs_str)
1211 def __init__(self, tlvs_factories): argument
1212 self._tlvs_factories = tlvs_factories
1214 def _get_length(self, data): argument
1217 if length == self._MARKER_EXTENDED_LENGTH:
1222 def _get_tlv_factory(self, _type): argument
1224 return self._tlvs_factories[_type]
1229 def _parse_tlv(self, data, message_info): argument
1231 length = self._get_length(data)
1234 factory = self._get_tlv_factory(_type)
1238 def parse(self, data, message_info): argument
1243 tlv = self._parse_tlv(data, message_info)
1251 def __init__(self, command): argument
1252 self._command = command
1255 def command(self): argument
1256 return self._command
1258 def __repr__(self): argument
1259 return "MleMessage(command={})".format(self.command)
1264 def __init__(self, aux_sec_hdr, command, mic): argument
1265 super(MleMessageSecured, self).__init__(command)
1266 self._aux_sec_hdr = aux_sec_hdr
1267 self._mic = mic
1270 def aux_sec_hdr(self): argument
1271 return self._aux_sec_hdr
1274 def mic(self): argument
1275 return self._mic
1277 def __repr__(self): argument
1278 … "MleMessageSecured(aux_sec_hdr={}, command={}, mic=\"{}\")".format(self.aux_sec_hdr, self.command,
1279 hexlify(self.mic))
1284 def __init__(self, aux_sec_hdr_factory, mle_command_factory, crypto_engine): argument
1285 self._aux_sec_hdr_factory = aux_sec_hdr_factory
1286 self._mle_command_factory = mle_command_factory
1287 self._crypto_engine = crypto_engine
1289 def _create_mle_secured_message(self, data, message_info): argument
1290 aux_sec_hdr = self._aux_sec_hdr_factory.parse(data, message_info)
1294 … enc_data = bytearray(data.read(enc_data_length - data.tell() - self._crypto_engine.mic_length))
1297 dec_data = self._crypto_engine.decrypt(enc_data, mic, message_info)
1299 command = self._mle_command_factory.parse(io.BytesIO(dec_data), message_info)
1303 def _create_mle_message(self, data, message_info): argument
1304 command = self._mle_command_factory.parse(data, message_info)
1308 def parse(self, data, message_info): argument
1312 return self._create_mle_secured_message(data, message_info)
1315 return self._create_mle_message(data, message_info)