mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-26 15:28:35 +03:00
Add more documentation to the classes/methods
* add type annotations in-line with PEP484 * convert existing documentation to follow the "Google Python Style Guide" format understood by the sphinx.ext.napoleon' extension * add much more documentation all over the code base Change-Id: I6ac88e0662cf3c56ae32d86d50b18a8b4150571a
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
""" pySim: Transport Link for Calypso bases phones
|
||||
"""
|
||||
|
||||
#
|
||||
# Copyright (C) 2018 Vadim Yanitskiy <axilirator@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
@@ -73,8 +69,9 @@ class L1CTLMessageSIM(L1CTLMessage):
|
||||
self.data += pdu
|
||||
|
||||
class CalypsoSimLink(LinkBase):
|
||||
"""Transport Link for Calypso based phones."""
|
||||
|
||||
def __init__(self, sock_path = "/tmp/osmocom_l2"):
|
||||
def __init__(self, sock_path:str = "/tmp/osmocom_l2"):
|
||||
# Make sure that a given socket path exists
|
||||
if not os.path.exists(sock_path):
|
||||
raise ReaderError("There is no such ('%s') UNIX socket" % sock_path)
|
||||
@@ -119,7 +116,6 @@ class CalypsoSimLink(LinkBase):
|
||||
pass # Nothing to do really ...
|
||||
|
||||
def send_apdu_raw(self, pdu):
|
||||
"""see LinkBase.send_apdu_raw"""
|
||||
|
||||
# Request FULL reset
|
||||
req_msg = L1CTLMessageSIM(h2b(pdu))
|
||||
|
||||
Reference in New Issue
Block a user