Exporting to CSV synphasor (PMU) data

asked 2025-04-18 01:57:20 +0000

Zebacking gravatar image

updated 2025-04-18 07:35:25 +0000

grahamb gravatar image

Hello, I'm trying to export to CSV some data from PMU (synphasor). When I chose synphasor.phasor in the tshark code, it returns the name of the chanel, I want to have the value. Is that possible

"C:\Program Files\Wireshark\tshark.exe"   -r "%arquivo%" -Y "%filtro%" -T fields -e frame.number -e frame.time_utc -e eth.src -e eth.dst -e synphasor.actual_frequency_value -e synphasor.rate_change_frequency -e synphasor.phasor.real -E occurrence=a -E header=y -E separator=, -E quote=d > "%saida%"
edit retag flag offensive close merge delete

Comments

Hello grahamb, I've tried this but it seems that my WS doesn't have this field to export "synphasor.phasor.real". Thanks

Zebacking gravatar imageZebacking ( 2025-04-18 12:19:46 +0000 )edit

Display Filter Reference: IEEE C37.118 Synchrophasor Protocol
synphasor.phasor Phasor Character string 2.0.0 to 4.4.6

https://gitlab.com/wireshark/wireshar...

        pi = (phasor_info *)wmem_array_index(block->phasors, j);
        temp_item = proto_tree_add_string_format(phasor_tree, hf_synphasor_phasor, tvb, offset,
                        floating_point == block->format_ph ? 8 : 4, pi->name,
                        "Phasor #%u: \"%s\"", j + 1, pi->name);


/* holds the information required to dissect a single phasor */
typedef struct {
    char    name[MAX_NAME_LEN + 1];
    unit_e  unit;
    uint32_t    conv;           /* cfg-2 conversion factor in 10^-5 scale */
    float   conv_cfg3;      /* cfg-3 conversion scale factor */
    float   angle_offset_cfg3;  /* cfg-3 angle offset */
} phasor_info;

There is a sample capture attached to 8695: Enhancement to packet-synphasor.c to use 'new_' versions of dissector registration and initialization
From frame 651:

Phasors (10), notation: rectangular, format: integer
    Phasor #1: "IAPM            ",     11.270A ∠-26.053° alt  10.125+j -4.950A; unscaled:    45,   -22
    Phasor #2: "IBPM            ",      4.528A ∠-26.565° alt   4.050+j -2.025A; unscaled:    18,    -9
    Phasor #3: "ICPM ...
(more)
Chuckc gravatar imageChuckc ( 2025-04-18 14:10:19 +0000 )edit

In you example, when I use synphasor.phasor, using the "-E occurrence=a", is showing the texts IAPM, IBPM, ICPM, etc. instead I want to save 11.270A -26.053 or 10.125+j4,95.

thnks

Zebacking gravatar imageZebacking ( 2025-04-18 15:48:05 +0000 )edit