ska_tmc_centralnode.utils package

Submodules

ska_tmc_centralnode.utils.config_json_validator module

class ska_tmc_centralnode.utils.config_json_validator.DishConfigValidator(dish_config_json, k_value_valid_range_lower_limit, k_value_valid_range_upper_limit)

Bases: object

This class implement method to validate DishConfig json

is_json_valid()

This method validate json as per following rules

  1. DishIDs are valid dishIDs (SKA001-133, MKT000-063)

  2. DishIDs are unique

  3. vcc_ids are unique

  4. valid range of k values (integer in the range 1-2222)

  5. valid range of vcc_ids

Sample Json:
"dish_parameters": {
    "SKA001": {
        "vcc": 1,
        "k"  : 11
    },
    "SKA100": {
        "vcc": 2,
        "k"  : 101
    },
    "SKA036": {
        "vcc": 3,
        "k"  : 1127
    },
    "SKA063": {
        "vcc": 4,
        "k"  : 620
    }
}
Return type:

tuple[bool, str]

Returns:

Tuple of bool and str. True, “” if json is valid, False, message otherwise

ska_tmc_centralnode.utils.constants module

Common constant used in centralnode

Module contents