aesr-lab / ATDECC

Python-based ATDECC endpoint/controller
0 stars 0 forks source link

Dynamic AEM fields #1

Open grrrr opened 8 months ago

grrrr commented 8 months ago

Some of the fields of the AEM structure will have to be dynamic. Most prominently, this applies to the grandmaster ID which must be retrieved from the PTP service. Polling at regular intervals for results of shell scripts should be fine.

grrrr commented 8 months ago

Ok, the gptp_grandmaster_id parameter is not output to the network at all at the moment. This should happen in the aecp.__init__.EntityModelEntityStateMachine._handleGetAvbInfo where the response_payload is currently

            0, # gptp_grandmaster_id
            0, # propagation_delay
            0, # gptp_domain_number
grrrr commented 8 months ago

The gptp_grandmaster_id can be queried with, e.g. pmc -2 -t 1 -i enp7s0 "GET TIME_STATUS_NP", where enp7s0 is the ptp network interface. This delivers:

sending: GET TIME_STATUS_NP
        d83add.fffe.bcf202-1 seq 0 RESPONSE MANAGEMENT TIME_STATUS_NP 
                master_offset              26
                ingress_time               7951230724232621
                cumulativeScaledRateOffset +0.000000025
                scaledLastGmPhaseChange    0
                gmTimeBaseIndicator        0
                lastGmPhaseChange          0x0000'0000000000000000.0000
                gmPresent                  true
                gmIdentity                 000a92.fffe.01c0df