intrepidcs / python_ics

Library for interfacing with Intrepid devices in Python
MIT License
61 stars 29 forks source link

Some structures aren't being generated correctly. #186

Closed drebbe-intrepid closed 2 months ago

drebbe-intrepid commented 2 months ago

Some structures aren't being generated correctly. Looks like anything ending in _t isn't being parsed correctly.

# This file was auto generated; Do not modify, if you value your sanity!
import ctypes
import enum

from ics.structures.mac_sec_flags_ import *
from ics.structures.mac_sec_map_ import *
from ics.structures.mac_sec_rule_ import *
from ics.structures.mac_sec_sa_ import *
from ics.structures.mac_sec_sc_ import *
from ics.structures.mac_sec_sec_y_ import *

class macsec_config(ctypes.Structure):
    _pack_ = 1
    _fields_ = [
        ('flags', MACSecFlags_t),
        ('rule', MACSecRule_t * 2),
        ('map', MACSecMap_t * 2),
        ('secy', MACSecSecY_t * 2),
        ('sc', MACSecSc_t * 2),
        ('sa', MACSecSa_t * 4),
    ]

MACSEC_CONFIG_t = macsec_config
MACSEC_CONFIG = macsec_config
drebbe-intrepid commented 2 months ago

after PR:


# This file was auto generated; Do not modify, if you value your sanity!
import ctypes
import enum

from ics.structures.mac_sec_flags_t import *
from ics.structures.mac_sec_map_t import *
from ics.structures.mac_sec_rule_t import *
from ics.structures.mac_sec_sa_t import *
from ics.structures.mac_sec_sc_t import *
from ics.structures.mac_sec_sec_y_t import *

class macsec_config(ctypes.Structure):
    _pack_ = 1
    _fields_ = [
        ('flags', MACSecFlags_t),
        ('rule', MACSecRule_t * 2),
        ('map', MACSecMap_t * 2),
        ('secy', MACSecSecY_t * 2),
        ('sc', MACSecSc_t * 2),
        ('sa', MACSecSa_t * 4),
    ]

MACSEC_CONFIG_t = macsec_config
MACSEC_CONFIG = macsec_config