networking#

class perceptivo.types.networking.Socket(id: str, socket_type: Literal['REQ', 'REP', 'PUB', 'SUB', 'PAIR', 'DEALER', 'ROUTER', 'PULL', 'PUSH'], protocol: Literal['tcp', 'ipc', 'inproc'], mode: Literal['connect', 'bind'], port: int, ip: str = '*', to: Optional[str] = None)#

Bases: object

id: str#
socket_type: Literal['REQ', 'REP', 'PUB', 'SUB', 'PAIR', 'DEALER', 'ROUTER', 'PULL', 'PUSH']#
protocol: Literal['tcp', 'ipc', 'inproc']#
mode: Literal['connect', 'bind']#
port: int#
ip: str = '*'#
to: Optional[str] = None#
pydantic model perceptivo.types.networking.Clinician_Networking#

Bases: pydantic.main.BaseModel

Default networking properties for the Clinician computer

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Show JSON schema
{
   "title": "Clinician_Networking",
   "description": "Default networking properties for the Clinician computer",
   "type": "object",
   "properties": {
      "ip": {
         "title": "Ip",
         "default": "",
         "type": "string"
      },
      "patient_ip": {
         "title": "Patient Ip",
         "default": "",
         "type": "string"
      },
      "eyecam": {
         "title": "Eyecam",
         "default": {
            "id": "clinician:eyecam",
            "socket_type": "PULL",
            "protocol": "tcp",
            "mode": "bind",
            "port": 5500,
            "ip": "*",
            "to": null
         },
         "allOf": [
            {
               "$ref": "#/definitions/Socket"
            }
         ]
      },
      "control": {
         "title": "Control",
         "default": {
            "id": "clinician:control",
            "socket_type": "ROUTER",
            "protocol": "tcp",
            "mode": "bind",
            "port": 5600,
            "ip": "*",
            "to": null
         },
         "allOf": [
            {
               "$ref": "#/definitions/Socket"
            }
         ]
      }
   },
   "definitions": {
      "Socket": {
         "title": "Socket",
         "type": "object",
         "properties": {
            "id": {
               "title": "Id",
               "type": "string"
            },
            "socket_type": {
               "title": "Socket Type",
               "enum": [
                  "REQ",
                  "REP",
                  "PUB",
                  "SUB",
                  "PAIR",
                  "DEALER",
                  "ROUTER",
                  "PULL",
                  "PUSH"
               ],
               "type": "string"
            },
            "protocol": {
               "title": "Protocol",
               "enum": [
                  "tcp",
                  "ipc",
                  "inproc"
               ],
               "type": "string"
            },
            "mode": {
               "title": "Mode",
               "enum": [
                  "connect",
                  "bind"
               ],
               "type": "string"
            },
            "port": {
               "title": "Port",
               "type": "integer"
            },
            "ip": {
               "title": "Ip",
               "default": "*",
               "type": "string"
            },
            "to": {
               "title": "To",
               "type": "string"
            }
         },
         "required": [
            "id",
            "socket_type",
            "protocol",
            "mode",
            "port"
         ]
      }
   }
}

Fields
field ip: str = ''#
field patient_ip: str = ''#
field eyecam: perceptivo.types.networking.Socket = Socket(id='clinician:eyecam', socket_type='PULL', protocol='tcp', mode='bind', port=5500, ip='*', to=None)#
field control: perceptivo.types.networking.Socket = Socket(id='clinician:control', socket_type='ROUTER', protocol='tcp', mode='bind', port=5600, ip='*', to=None)#
pydantic model perceptivo.types.networking.Patient_Networking#

Bases: pydantic.main.BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Show JSON schema
{
   "title": "Patient_Networking",
   "type": "object",
   "properties": {
      "ip": {
         "title": "Ip",
         "default": "",
         "type": "string"
      },
      "clinician_ip": {
         "title": "Clinician Ip",
         "default": "",
         "type": "string"
      },
      "eyecam": {
         "title": "Eyecam",
         "default": {
            "id": "patient:eyecam",
            "socket_type": "PUSH",
            "protocol": "tcp",
            "mode": "connect",
            "port": 5500,
            "ip": "",
            "to": null
         },
         "allOf": [
            {
               "$ref": "#/definitions/Socket"
            }
         ]
      },
      "control": {
         "title": "Control",
         "default": {
            "id": "patient:control",
            "socket_type": "DEALER",
            "protocol": "tcp",
            "mode": "connect",
            "port": 5600,
            "ip": "",
            "to": "clinician:control"
         },
         "allOf": [
            {
               "$ref": "#/definitions/Socket"
            }
         ]
      }
   },
   "definitions": {
      "Socket": {
         "title": "Socket",
         "type": "object",
         "properties": {
            "id": {
               "title": "Id",
               "type": "string"
            },
            "socket_type": {
               "title": "Socket Type",
               "enum": [
                  "REQ",
                  "REP",
                  "PUB",
                  "SUB",
                  "PAIR",
                  "DEALER",
                  "ROUTER",
                  "PULL",
                  "PUSH"
               ],
               "type": "string"
            },
            "protocol": {
               "title": "Protocol",
               "enum": [
                  "tcp",
                  "ipc",
                  "inproc"
               ],
               "type": "string"
            },
            "mode": {
               "title": "Mode",
               "enum": [
                  "connect",
                  "bind"
               ],
               "type": "string"
            },
            "port": {
               "title": "Port",
               "type": "integer"
            },
            "ip": {
               "title": "Ip",
               "default": "*",
               "type": "string"
            },
            "to": {
               "title": "To",
               "type": "string"
            }
         },
         "required": [
            "id",
            "socket_type",
            "protocol",
            "mode",
            "port"
         ]
      }
   }
}

Fields
field ip: str = ''#
field clinician_ip: str = ''#
field eyecam: perceptivo.types.networking.Socket = Socket(id='patient:eyecam', socket_type='PUSH', protocol='tcp', mode='connect', port=5500, ip='', to=None)#
field control: perceptivo.types.networking.Socket = Socket(id='patient:control', socket_type='DEALER', protocol='tcp', mode='connect', port=5600, ip='', to='clinician:control')#