PyJEM.stem4d

This package is used to control the eds functions of the FEMTUS.

Caution:

This package supports some functions published by the FEMTUS. Therefore, this package cann’t be used under the following conditions.

  • The FEMTUS is not configured in the network.

  • The FEMTUS is not running.

PyJEM.stem4d.set_ip(val)

Set the IP address used by this package.

Parameters:

val (str) – IP address.

Return type:

None

Examples

>>> set_ip("127.0.0.1")
PyJEM.stem4d.set_port(val)

Set the port number used by this package.

Parameters:

val (int) – Port number.

Return type:

None

Warning

Please do not use this except for JEOL service staff.

Examples

>>> set_ip("127.0.0.1")
PyJEM.stem4d.get_config()

Get this package connection settings.

Returns:

Service configuration dictionary.

Return type:

dict

PyJEM.stem4d.check_connection(timeout=3.0)

Check whether the target service is running.

Parameters:

timeout (float) – timout in seconds for the connection check. Default is 3.0 seconds.

Returns:

True if the target service is running. False if the service is not running or the IP address or port number may be incorrect.

Return type:

bool

Examples

>>> check_connection()
True