API for the "sensor fill event" function - continued

Here is a snippet of code:

...
/* Fill the Platform Event Message request */
static char sensor_gpio_set_fill_event(/* To be defined */)
{
  char rtn = sensor_discrete_fill_event(/* To be defined */);
  sensor_gpio_set_t *s = (sensor_gpio_set_t *)sensor;

  /* Write sensor reading value */
  /* Event Data 1 */ = 0xA0 | ((s->reading & s->mask) == s->mask);

  if ((/* Event Dir and Type */ & 0x80) == 0x80) { /* Deassertion */
    /* Event Data 2 */ = ~s->reading & s->mask;
  }
  else { /* Assertion */
    /* Event Data 2 */ = s->reading & s->mask;
  }

  /* Event Data 3 */ = s->reading & s->mask;

  /* Return Platform Event request length (7 bytes) */
  return 7;
}

Cheers,

Fatih

Hello Fatih,

sorry, but without having access to all the code it’s difficult to help here. Can you ask the maintainer of the LATOURNETT-ipmc repository to give me read access?

cheers,

Stefan

···

On 26/11/2024 09:47, Fatih Bellachia via CERN IPMC wrote:

fbellach
November 26

API for the “sensor fill event” function Software

Hello Fatih, I’m not sure I fully understand what you are trying to do. You have written or are writing a custom discrete sensors driver? It would help if you can share your code. cheers, Stefan

Here is a snippet of code:

...
/* Fill the Platform Event Message request */
static char sensor_gpio_set_fill_event(/* To be defined */)
{
  char rtn = sensor_discrete_fill_event(/* To be defined */);
  sensor_gpio_set_t *s = (sensor_gpio_set_t *)sensor;

  /* Write sensor reading value */
  /* Event Data 1 */ = 0xA0 | ((s->reading & s->mask) == s->mask);

  if ((/* Event Dir and Type */ & 0x80) == 0x80) { /* Deassertion */
    /* Event Data 2 */ = ~s->reading & s->mask;
  }
  else { /* Assertion */
    /* Event Data 2 */ = s->reading & s->mask;
  }

  /* Event Data 3 */ = s->reading & s->mask;

  /* Return Platform Event request length (7 bytes) */
  return 7;
}

Cheers,

Fatih


Visit Message or reply to this email to respond to fbellach.

To unsubscribe from these emails, click here.

Hi Stefan,

I would just like to have the API of the sensor_discrete_fill_event(??, ??, …) function (i.e. the type/name of parameters passed to the function), as well as access to the fields of the ‘Platform Event Message’ request structure (or unsigned char pointer), so that I can update them.

The maintainer pointed out that to obtain read-only access, you need to register with eGroups atlas-lar-latournett-fw.

Cheers,

Fatih

Hello Fatih,

I have asked to be added to the e-group. In the meantime, here is the definition of the function:

/* Fill the event message */
char sensor_discrete_fill_event(sensor_t *sensor,
ipmi_sel_entry_t *sel_entry, unsigned short old_state,
unsigned short *new_state, unsigned short unmasked_changes)

The sel_entry structure is:

/* SEL Event Record */
typedef struct {
unsigned short record_id;
unsigned char record_type;
unsigned long timestamp;
unsigned char src_address;
unsigned char gen_id_byte2;
unsigned char version;
unsigned char sensor_type;
unsigned char sensor_number;
unsigned char event_dir_type;
unsigned char data[3];
} PACKED ipmi_sel_entry_t;

I believe you want to modify the data field.

cheers,

Stefan

···

On 28/11/2024 10:02, Fatih Bellachia via CERN IPMC wrote:

fbellach
November 28

Hi Stefan,

I would just like to have the API of the sensor_discrete_fill_event(??, ??, …) function (i.e. the type/name of parameters passed to the function), as well as access to the fields of the ‘Platform Event Message’ request structure (or unsigned char pointer), so that I can update them.

The maintainer pointed out that to obtain read-only access, you need to register with eGroups atlas-lar-latournett-fw.

Cheers,

Fatih


Visit Message or reply to this email to respond to fbellach.


In Reply To

haass
November 28

Hello Fatih, sorry, but without having access to all the code it’s difficult to help here. Can you ask the maintainer of the LATOURNETT-ipmc repository to give me read access? cheers, Stefan ··· (click for more details)


Visit Message or reply to this email to respond to fbellach.

To unsubscribe from these emails, click here.

Hi Stefan,

Thank you,

Yes, this is the data field I want to modify.

Cheers,

Fatih