de_twin.faces.temchannel_soap.TemChannelServer#

class de_twin.faces.temchannel_soap.TemChannelServer(column, host='0.0.0.0', port=5002, *, enforce_service_ranges=True, log_requests=False, corrector_side=None)[source]#

Bases: object

A threaded HTTP server speaking the DE-TEM-Channel SOAP API over a Column.

>>> srv = TemChannelServer(column, host="127.0.0.1", port=5002).start()
>>> ...
>>> srv.stop()

port=0 picks a free port (read it back from srv.port). handle(xml) answers one request without any socket (used to replay the recorded samples).

Parameters:
  • column (Column)

  • host (str)

  • port (int)

  • enforce_service_ranges (bool)

  • log_requests (bool)

  • corrector_side (str | None)

__init__(column, host='0.0.0.0', port=5002, *, enforce_service_ranges=True, log_requests=False, corrector_side=None)[source]#
Parameters:
  • column (Column)

  • host (str)

  • port (int)

  • enforce_service_ranges (bool)

  • log_requests (bool)

  • corrector_side (str | None)

Methods

__init__(column[, host, port, ...])

batch_field(key)

One executeBatchCommands field, formatted like the channel's stringstream.

corrector_unit()

The served CorrectorUnit, or None.

handle(xml)

Answer one SOAP request.

op_status(op_id)

GetPropertyOperationStatus: stage ops are Running while the column moves.

operations()

property_value(key)

The getProperty string for key ("" for unknown keys, like the channel).

start()

stop()

Attributes

MAX_CORRECTOR_WAIT_MS

CorrectorService.cpp kMaxCorrectorWaitMs

port

url

property port: int#
property url: str#
start()[source]#
Return type:

TemChannelServer

stop()[source]#
Return type:

None

handle(xml)[source]#

Answer one SOAP request. Returns (HTTP status, response XML).

Parameters:

xml (bytes | str)

Return type:

tuple[int, str]

operations()[source]#
Return type:

list[str]

op_status(op_id)[source]#

GetPropertyOperationStatus: stage ops are Running while the column moves.

Parameters:

op_id (int)

Return type:

int

MAX_CORRECTOR_WAIT_MS = 5000#

CorrectorService.cpp kMaxCorrectorWaitMs

corrector_unit()[source]#

The served CorrectorUnit, or None.

property_value(key)[source]#

The getProperty string for key (”” for unknown keys, like the channel).

Parameters:

key (str)

Return type:

str

batch_field(key)[source]#

One executeBatchCommands field, formatted like the channel’s stringstream.

Parameters:

key (str)

Return type:

str