pm16c16.core package
- class Communication(ip_address, port=7777, timeout_sec=3.0, encoding='ascii')[ソース]
ベースクラス:
objectPMシリーズ用のTCP通信層。
TCPソケットの生成、接続、CR+LF単位の送受信、切断までをこのクラス内で 完結させる。外部の通信オブジェクトや別バックエンドは使用しない。
- パラメータ:
ip_address (str)
port (int)
timeout_sec (float)
encoding (str)
- property is_connected: bool
- exception CommunicationError[ソース]
ベースクラス:
MotorControlError通信処理に失敗した場合の例外。
- class MotorStatus(motor, raw='', remote_local='', direction='S', ls_status=0, motor_status='', position=0)[ソース]
ベースクラス:
object1軸分の状態を保持し、状態判定も担当する。
- パラメータ:
motor (int)
raw (str)
remote_local (str)
direction (str)
ls_status (int)
motor_status (str)
position (int)
- property ccw_ls: bool
- property cw_ls: bool
- classmethod from_single_response(requested_motor, raw)[ソース]
- パラメータ:
requested_motor (int)
raw (str)
- 戻り値の型:
- property hold_off: bool
- property hp_ls: bool
- property is_busy: bool
- property legacy_status_bits: int
- property rotation_state: int
- exception ProtocolError[ソース]
ベースクラス:
MotorControlError装置応答を解釈できない場合の例外。
Submodules
pm16c16.core.communication_tcp module
pm16c16.core.data module
pm16c16.core.errors module
- exception CommunicationError[ソース]
ベースクラス:
MotorControlError通信処理に失敗した場合の例外。
- exception ProtocolError[ソース]
ベースクラス:
MotorControlError装置応答を解釈できない場合の例外。
pm16c16.core.motor_status module
- class MotorStatus(motor, raw='', remote_local='', direction='S', ls_status=0, motor_status='', position=0)[ソース]
ベースクラス:
object1軸分の状態を保持し、状態判定も担当する。
- パラメータ:
motor (int)
raw (str)
remote_local (str)
direction (str)
ls_status (int)
motor_status (str)
position (int)
- property ccw_ls: bool
- property cw_ls: bool
- classmethod from_single_response(requested_motor, raw)[ソース]
- パラメータ:
requested_motor (int)
raw (str)
- 戻り値の型:
- property hold_off: bool
- property hp_ls: bool
- property is_busy: bool
- property legacy_status_bits: int
- property rotation_state: int