blob: d6426f687b506ba973e1cc05b6398c910b19514b [file] [log] [blame]
Chris Austenac4604a2015-10-13 12:43:27 -05001#ifndef __HOST_IPMI_SEN_HANDLER_H__
2#define __HOST_IPMI_SEN_HANDLER_H__
3
Chris Austen0012e9b2015-10-22 01:37:46 -05004#include <stdint.h>
Tom Joseph816e92b2017-09-06 19:23:00 +05305#include "types.hpp"
Tom Joseph5ca50952018-02-22 00:33:38 +05306#include "host-ipmid/ipmid-api.h"
Chris Austen0012e9b2015-10-22 01:37:46 -05007
Chris Austenac4604a2015-10-13 12:43:27 -05008// IPMI commands for net functions.
9enum ipmi_netfn_sen_cmds
10{
Tom Joseph5ca50952018-02-22 00:33:38 +053011 IPMI_CMD_GET_DEVICE_SDR_INFO = 0x20,
12 IPMI_CMD_GET_DEVICE_SDR = 0x21,
13 IPMI_CMD_RESERVE_DEVICE_SDR_REPO = 0x22,
Chris Austen10ccc0f2015-12-10 18:27:04 -060014 IPMI_CMD_GET_SENSOR_READING = 0x2D,
Emily Shafferd06e0e72017-04-05 09:08:57 -070015 IPMI_CMD_GET_SENSOR_TYPE = 0x2F,
16 IPMI_CMD_SET_SENSOR = 0x30,
Dhruvaraj Subhashchandran5c0beec2018-01-23 04:47:06 -060017 IPMI_CMD_GET_SENSOR_THRESHOLDS = 0x27,
Chris Austenac4604a2015-10-13 12:43:27 -050018};
19
Ratan Guptae0cc8552018-01-22 14:23:04 +053020/**
21 * @enum device_type
22 * IPMI FRU device types
23 */
24enum device_type
25{
26 IPMI_PHYSICAL_FRU = 0x00,
27 IPMI_LOGICAL_FRU = 0x80,
28};
29
Emily Shaffer1fabf222017-04-05 08:53:21 -070030// Discrete sensor types.
31enum ipmi_sensor_types
32{
33 IPMI_SENSOR_TEMP = 0x01,
34 IPMI_SENSOR_VOLTAGE = 0x02,
35 IPMI_SENSOR_CURRENT = 0x03,
36 IPMI_SENSOR_FAN = 0x04,
Tom Joseph60cac722017-08-18 12:06:07 +053037 IPMI_SENSOR_TPM = 0xCC,
Emily Shaffer1fabf222017-04-05 08:53:21 -070038};
39
Chris Austen0012e9b2015-10-22 01:37:46 -050040#define MAX_DBUS_PATH 128
41struct dbus_interface_t {
42 uint8_t sensornumber;
43 uint8_t sensortype;
44
45 char bus[MAX_DBUS_PATH];
46 char path[MAX_DBUS_PATH];
47 char interface[MAX_DBUS_PATH];
48};
Tomd700e762016-09-20 18:24:13 +053049
50int set_sensor_dbus_state_s(uint8_t , const char *, const char *);
51int set_sensor_dbus_state_y(uint8_t , const char *, const uint8_t);
Emily Shaffer2ae09b92017-04-05 15:09:41 -070052int find_openbmc_path(uint8_t , dbus_interface_t *);
Tom05732372016-09-06 17:21:23 +053053
Tom Joseph5ca50952018-02-22 00:33:38 +053054ipmi_ret_t ipmi_sen_get_sdr(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
55 ipmi_request_t request, ipmi_response_t response,
56 ipmi_data_len_t data_len, ipmi_context_t context);
57
58ipmi_ret_t ipmi_sen_reserve_sdr(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
59 ipmi_request_t request,
60 ipmi_response_t response,
61 ipmi_data_len_t data_len,
62 ipmi_context_t context);
63
Ratan Guptae0cc8552018-01-22 14:23:04 +053064static const uint16_t FRU_RECORD_ID_START = 256;
65static const uint8_t SDR_VERSION = 0x51;
66static const uint16_t END_OF_RECORD = 0xFFFF;
67static const uint8_t LENGTH_MASK = 0x1F;
68
Tom Josephbe703f72017-03-09 12:34:35 +053069/**
Emily Shafferd06e0e72017-04-05 09:08:57 -070070 * Get SDR Info
71 */
72
73namespace get_sdr_info
74{
75namespace request
76{
77// Note: for some reason the ipmi_request_t appears to be the
78// raw value for this call.
79inline bool get_count(void* req)
80{
81 return (bool)((uint64_t)(req) & 1);
82}
83} // namespace request
84
85namespace response
86{
87#define SDR_INFO_RESP_SIZE 2
88inline void set_lun_present(int lun, uint8_t* resp)
89{
90 *resp |= 1 << lun;
91}
92inline void set_lun_not_present(int lun, uint8_t* resp)
93{
94 *resp &= ~(1 << lun);
95}
96inline void set_dynamic_population(uint8_t* resp)
97{
98 *resp |= 1 << 7;
99}
100inline void set_static_population(uint8_t* resp)
101{
102 *resp &= ~(1 << 7);
103}
104} // namespace response
105
106struct GetSdrInfoResp
107{
108 uint8_t count;
109 uint8_t luns_and_dynamic_population;
110};
111
112} // namespace get_sdr_info
Emily Shafferbbef71c2017-05-08 16:36:17 -0700113
114/**
115 * Get SDR
116 */
117namespace get_sdr
118{
119
120struct GetSdrReq
121{
122 uint8_t reservation_id_lsb;
123 uint8_t reservation_id_msb;
124 uint8_t record_id_lsb;
125 uint8_t record_id_msb;
126 uint8_t offset;
127 uint8_t bytes_to_read;
128} __attribute__((packed));
129
130namespace request
131{
132
133inline uint8_t get_reservation_id(GetSdrReq* req)
134{
135 return (req->reservation_id_lsb + (req->reservation_id_msb << 8));
136};
137
Ratan Guptae0cc8552018-01-22 14:23:04 +0530138inline uint16_t get_record_id(GetSdrReq* req)
Emily Shafferbbef71c2017-05-08 16:36:17 -0700139{
140 return (req->record_id_lsb + (req->record_id_msb << 8));
141};
142
143} // namespace request
144
145// Response
146struct GetSdrResp
147{
148 uint8_t next_record_id_lsb;
149 uint8_t next_record_id_msb;
150 uint8_t record_data[64];
151} __attribute__((packed));
152
153namespace response
154{
155
Ratan Guptae0cc8552018-01-22 14:23:04 +0530156inline void set_next_record_id(uint16_t next, GetSdrResp* resp)
Emily Shafferbbef71c2017-05-08 16:36:17 -0700157{
158 resp->next_record_id_lsb = next & 0xff;
159 resp->next_record_id_msb = (next >> 8) & 0xff;
160};
161
162} // namespace response
163
164// Record header
165struct SensorDataRecordHeader
166{
167 uint8_t record_id_lsb;
168 uint8_t record_id_msb;
169 uint8_t sdr_version;
170 uint8_t record_type;
171 uint8_t record_length; // Length not counting the header
172} __attribute__((packed));
173
174namespace header
175{
176
177inline void set_record_id(int id, SensorDataRecordHeader* hdr)
178{
179 hdr->record_id_lsb = (id & 0xFF);
180 hdr->record_id_msb = (id >> 8) & 0xFF;
181};
182
183} // namespace header
184
185enum SensorDataRecordType
186{
Ratan Guptae0cc8552018-01-22 14:23:04 +0530187 SENSOR_DATA_FULL_RECORD = 0x1,
188 SENSOR_DATA_FRU_RECORD = 0x11,
Emily Shafferbbef71c2017-05-08 16:36:17 -0700189};
190
191// Record key
192struct SensorDataRecordKey
193{
194 uint8_t owner_id;
195 uint8_t owner_lun;
196 uint8_t sensor_number;
197} __attribute__((packed));
198
Ratan Guptae0cc8552018-01-22 14:23:04 +0530199/** @struct SensorDataFruRecordKey
200 *
201 * FRU Device Locator Record(key) - SDR Type 11
202 */
203struct SensorDataFruRecordKey
204{
205 uint8_t deviceAddress;
206 uint8_t fruID;
207 uint8_t accessLun;
208 uint8_t channelNumber;
209} __attribute__((packed));
210
Emily Shafferbbef71c2017-05-08 16:36:17 -0700211namespace key
212{
213
214inline void set_owner_id_ipmb(SensorDataRecordKey* key)
215{
216 key->owner_id &= ~0x01;
217};
218
219inline void set_owner_id_system_sw(SensorDataRecordKey* key)
220{
221 key->owner_id |= 0x01;
222};
223
Tom Joseph96423912018-01-25 00:14:34 +0530224inline void set_owner_id_bmc(SensorDataRecordKey* key)
225{
226 key->owner_id |= 0x20;
227};
228
Emily Shafferbbef71c2017-05-08 16:36:17 -0700229inline void set_owner_id_address(uint8_t addr, SensorDataRecordKey* key)
230{
231 key->owner_id &= 0x01;
232 key->owner_id |= addr<<1;
233};
234
235inline void set_owner_lun(uint8_t lun, SensorDataRecordKey* key)
236{
237 key->owner_lun &= ~0x03;
238 key->owner_lun |= (lun&0x03);
239};
240
241inline void set_owner_lun_channel(uint8_t channel, SensorDataRecordKey* key)
242{
243 key->owner_lun &= 0x0f;
244 key->owner_lun |= ((channel & 0xf)<<4);
245};
246
247} // namespace key
248
Dhruvaraj Subhashchandran5c0beec2018-01-23 04:47:06 -0600249/** @struct GetSensorThresholdsResponse
250 *
251 * Response structure for Get Sensor Thresholds command
252 */
253struct GetSensorThresholdsResponse
254{
Tom Joseph0ac0dd22018-02-16 09:14:45 +0530255 uint8_t validMask; //!< valid mask
256 uint8_t lowerNonCritical; //!< lower non-critical threshold
257 uint8_t lowerCritical; //!< lower critical threshold
258 uint8_t lowerNonRecoverable;//!< lower non-recoverable threshold
259 uint8_t upperNonCritical; //!< upper non-critical threshold
260 uint8_t upperCritical; //!< upper critical threshold
261 uint8_t upperNonRecoverable;//!< upper non-recoverable threshold
Dhruvaraj Subhashchandran5c0beec2018-01-23 04:47:06 -0600262} __attribute__((packed));
263
Emily Shafferbbef71c2017-05-08 16:36:17 -0700264// Body - full record
265#define FULL_RECORD_ID_STR_MAX_LENGTH 16
Ratan Guptae0cc8552018-01-22 14:23:04 +0530266
267static const int FRU_RECORD_DEVICE_ID_MAX_LENGTH = 16;
268
Emily Shafferbbef71c2017-05-08 16:36:17 -0700269struct SensorDataFullRecordBody
270{
271 uint8_t entity_id;
272 uint8_t entity_instance;
273 uint8_t sensor_initialization;
274 uint8_t sensor_capabilities; // no macro support
275 uint8_t sensor_type;
276 uint8_t event_reading_type;
277 uint8_t supported_assertions[2]; // no macro support
278 uint8_t supported_deassertions[2]; // no macro support
279 uint8_t discrete_reading_setting_mask[2]; // no macro support
280 uint8_t sensor_units_1;
281 uint8_t sensor_units_2_base;
282 uint8_t sensor_units_3_modifier;
283 uint8_t linearization;
284 uint8_t m_lsb;
285 uint8_t m_msb_and_tolerance;
286 uint8_t b_lsb;
287 uint8_t b_msb_and_accuracy_lsb;
288 uint8_t accuracy_and_sensor_direction;
289 uint8_t r_b_exponents;
290 uint8_t analog_characteristic_flags; //no macro support
291 uint8_t nominal_reading;
292 uint8_t normal_max;
293 uint8_t normal_min;
294 uint8_t sensor_max;
295 uint8_t sensor_min;
296 uint8_t upper_nonrecoverable_threshold;
297 uint8_t upper_critical_threshold;
298 uint8_t upper_noncritical_threshold;
299 uint8_t lower_nonrecoverable_threshold;
300 uint8_t lower_critical_threshold;
301 uint8_t lower_noncritical_threshold;
302 uint8_t positive_threshold_hysteresis;
303 uint8_t negative_threshold_hysteresis;
304 uint16_t reserved;
305 uint8_t oem_reserved;
306 uint8_t id_string_info;
Emily Shaffer10f49592017-05-10 12:01:10 -0700307 char id_string[FULL_RECORD_ID_STR_MAX_LENGTH];
Emily Shafferbbef71c2017-05-08 16:36:17 -0700308} __attribute__((packed));
309
Ratan Guptae0cc8552018-01-22 14:23:04 +0530310/** @struct SensorDataFruRecordBody
311 *
312 * FRU Device Locator Record(body) - SDR Type 11
313 */
314struct SensorDataFruRecordBody
315{
316 uint8_t reserved;
317 uint8_t deviceType;
318 uint8_t deviceTypeModifier;
319 uint8_t entityID;
320 uint8_t entityInstance;
321 uint8_t oem;
322 uint8_t deviceIDLen;
323 char deviceID[FRU_RECORD_DEVICE_ID_MAX_LENGTH];
324} __attribute__((packed));
325
Emily Shafferbbef71c2017-05-08 16:36:17 -0700326namespace body
327{
328
329inline void set_entity_instance_number(uint8_t n,
330 SensorDataFullRecordBody* body)
331{
332 body->entity_instance &= 1<<7;
333 body->entity_instance |= (n & ~(1<<7));
334};
335inline void set_entity_physical_entity(SensorDataFullRecordBody* body)
336{
337 body->entity_instance &= ~(1<<7);
338};
339inline void set_entity_logical_container(SensorDataFullRecordBody* body)
340{
341 body->entity_instance |= 1<<7;
342};
343
344inline void sensor_scanning_state(bool enabled,
345 SensorDataFullRecordBody* body)
346{
347 if (enabled)
348 {
349 body->sensor_initialization |= 1<<0;
350 }
351 else
352 {
353 body->sensor_initialization &= ~(1<<0);
354 };
355};
356inline void event_generation_state(bool enabled,
357 SensorDataFullRecordBody* body)
358{
359 if (enabled)
360 {
361 body->sensor_initialization |= 1<<1;
362 }
363 else
364 {
365 body->sensor_initialization &= ~(1<<1);
366 }
367};
368inline void init_types_state(bool enabled,
369 SensorDataFullRecordBody* body)
370{
371 if (enabled)
372 {
373 body->sensor_initialization |= 1<<2;
374 }
375 else
376 {
377 body->sensor_initialization &= ~(1<<2);
378 }
379};
380inline void init_hyst_state(bool enabled,
381 SensorDataFullRecordBody* body)
382{
383 if (enabled)
384 {
385 body->sensor_initialization |= 1<<3;
386 }
387 else
388 {
389 body->sensor_initialization &= ~(1<<3);
390 }
391};
392inline void init_thresh_state(bool enabled,
393 SensorDataFullRecordBody* body)
394{
395 if (enabled)
396 {
397 body->sensor_initialization |= 1<<4;
398 }
399 else
400 {
401 body->sensor_initialization &= ~(1<<4);
402 }
403};
404inline void init_events_state(bool enabled,
405 SensorDataFullRecordBody* body)
406{
407 if (enabled)
408 {
409 body->sensor_initialization |= 1<<5;
410 }
411 else
412 {
413 body->sensor_initialization &= ~(1<<5);
414 }
415};
416inline void init_scanning_state(bool enabled,
417 SensorDataFullRecordBody* body)
418{
419 if (enabled)
420 {
421 body->sensor_initialization |= 1<<6;
422 }
423 else
424 {
425 body->sensor_initialization &= ~(1<<6);
426 }
427};
428inline void init_settable_state(bool enabled,
429 SensorDataFullRecordBody* body)
430{
431 if (enabled)
432 {
433 body->sensor_initialization |= 1<<7;
434 }
435 else
436 {
437 body->sensor_initialization &= ~(1<<7);
438 }
439};
440
441inline void set_percentage(SensorDataFullRecordBody* body)
442{
443 body->sensor_units_1 |= 1<<0;
444};
445inline void unset_percentage(SensorDataFullRecordBody* body)
446{
447 body->sensor_units_1 &= ~(1<<0);
448};
449inline void set_modifier_operation(uint8_t op, SensorDataFullRecordBody* body)
450{
451 body->sensor_units_1 &= ~(3<<1);
452 body->sensor_units_1 |= (op & 0x3)<<1;
453};
454inline void set_rate_unit(uint8_t unit, SensorDataFullRecordBody* body)
455{
456 body->sensor_units_1 &= ~(7<<3);
457 body->sensor_units_1 |= (unit & 0x7)<<3;
458};
459inline void set_analog_data_format(uint8_t format,
460 SensorDataFullRecordBody* body)
461{
462 body->sensor_units_1 &= ~(3<<6);
463 body->sensor_units_1 |= (format & 0x3)<<6;
464};
465
Emily Shaffer7cad3fc2017-08-30 17:50:37 -0700466inline void set_m(uint16_t m, SensorDataFullRecordBody* body)
Emily Shafferbbef71c2017-05-08 16:36:17 -0700467{
468 body->m_lsb = m & 0xff;
469 body->m_msb_and_tolerance &= ~(3<<6);
470 body->m_msb_and_tolerance |= ((m & (3<<8)) >> 2);
471};
472inline void set_tolerance(uint8_t tol, SensorDataFullRecordBody* body)
473{
474 body->m_msb_and_tolerance &= ~0x3f;
475 body->m_msb_and_tolerance |= tol & 0x3f;
476};
477
Emily Shaffer7cad3fc2017-08-30 17:50:37 -0700478inline void set_b(uint16_t b, SensorDataFullRecordBody* body)
Emily Shafferbbef71c2017-05-08 16:36:17 -0700479{
480 body->b_lsb = b & 0xff;
481 body->b_msb_and_accuracy_lsb &= ~(3<<6);
482 body->b_msb_and_accuracy_lsb |= ((b & (3<<8)) >> 2);
483};
Emily Shaffer7cad3fc2017-08-30 17:50:37 -0700484inline void set_accuracy(uint16_t acc, SensorDataFullRecordBody* body)
Emily Shafferbbef71c2017-05-08 16:36:17 -0700485{
Emily Shaffer7cad3fc2017-08-30 17:50:37 -0700486 // bottom 6 bits
Emily Shafferbbef71c2017-05-08 16:36:17 -0700487 body->b_msb_and_accuracy_lsb &= ~0x3f;
488 body->b_msb_and_accuracy_lsb |= acc & 0x3f;
Emily Shaffer7cad3fc2017-08-30 17:50:37 -0700489 // top 4 bits
Emily Shafferbbef71c2017-05-08 16:36:17 -0700490 body->accuracy_and_sensor_direction &= 0x0f;
Emily Shaffer7cad3fc2017-08-30 17:50:37 -0700491 body->accuracy_and_sensor_direction |= ((acc >> 6) & 0xf) << 4;
Emily Shafferbbef71c2017-05-08 16:36:17 -0700492};
493inline void set_accuracy_exp(uint8_t exp, SensorDataFullRecordBody* body)
494{
495 body->accuracy_and_sensor_direction &= ~(3<<2);
496 body->accuracy_and_sensor_direction |= (exp & 3)<<2;
497};
498inline void set_sensor_dir(uint8_t dir, SensorDataFullRecordBody* body)
499{
500 body->accuracy_and_sensor_direction &= ~(3<<0);
501 body->accuracy_and_sensor_direction |= (dir & 3);
502};
503
504inline void set_b_exp(uint8_t exp, SensorDataFullRecordBody* body)
505{
506 body->r_b_exponents &= 0xf0;
507 body->r_b_exponents |= exp & 0x0f;
508};
509inline void set_r_exp(uint8_t exp, SensorDataFullRecordBody* body)
510{
511 body->r_b_exponents &= 0x0f;
512 body->r_b_exponents |= (exp & 0x0f)<<4;
513};
514
515inline void set_id_strlen(uint8_t len, SensorDataFullRecordBody* body)
516{
517 body->id_string_info &= ~(0x1f);
518 body->id_string_info |= len & 0x1f;
519};
520inline uint8_t get_id_strlen( SensorDataFullRecordBody* body)
521{
522 return body->id_string_info & 0x1f;
523};
524inline void set_id_type(uint8_t type, SensorDataFullRecordBody* body)
525{
526 body->id_string_info &= ~(3<<6);
527 body->id_string_info |= (type & 0x3)<<6;
528};
529
Ratan Guptae0cc8552018-01-22 14:23:04 +0530530inline void set_device_id_strlen(uint8_t len, SensorDataFruRecordBody* body)
531{
532 body->deviceIDLen &= ~(LENGTH_MASK);
533 body->deviceIDLen |= len & LENGTH_MASK;
534};
535
536inline uint8_t get_device_id_strlen(SensorDataFruRecordBody* body)
537{
538 return body->deviceIDLen & LENGTH_MASK;
539};
540
Tom Josephdc212b22018-02-16 09:59:57 +0530541inline void set_readable_mask(uint8_t mask, SensorDataFullRecordBody* body)
542{
543 body->discrete_reading_setting_mask[1] = mask & 0x3F;
544}
545
Emily Shafferbbef71c2017-05-08 16:36:17 -0700546} // namespace body
547
548// More types contained in section 43.17 Sensor Unit Type Codes,
549// IPMI spec v2 rev 1.1
550enum SensorUnitTypeCodes
551{
552 SENSOR_UNIT_UNSPECIFIED = 0,
553 SENSOR_UNIT_DEGREES_C = 1,
554 SENSOR_UNIT_VOLTS = 4,
555 SENSOR_UNIT_AMPERES = 5,
Tom Josephdc212b22018-02-16 09:59:57 +0530556 SENSOR_UNIT_WATTS = 6,
Emily Shafferbbef71c2017-05-08 16:36:17 -0700557 SENSOR_UNIT_JOULES = 7,
558 SENSOR_UNIT_METERS = 34,
559 SENSOR_UNIT_REVOLUTIONS = 41,
560};
561
562struct SensorDataFullRecord
563{
564 SensorDataRecordHeader header;
565 SensorDataRecordKey key;
566 SensorDataFullRecordBody body;
567} __attribute__((packed));
568
Ratan Guptae0cc8552018-01-22 14:23:04 +0530569/** @struct SensorDataFruRecord
570 *
571 * FRU Device Locator Record - SDR Type 11
572 */
573struct SensorDataFruRecord
574{
575 SensorDataRecordHeader header;
576 SensorDataFruRecordKey key;
577 SensorDataFruRecordBody body;
578} __attribute__((packed));
579
Emily Shafferbbef71c2017-05-08 16:36:17 -0700580} // get_sdr
Tom Joseph816e92b2017-09-06 19:23:00 +0530581
582namespace ipmi
583{
584
585namespace sensor
586{
587
588/**
589 * @brief Map offset to the corresponding bit in the assertion byte.
590 *
Gunnar Mills8991dd62017-10-25 17:11:29 -0500591 * The discrete sensors support up to 14 states. 0-7 offsets are stored in one
Tom Joseph816e92b2017-09-06 19:23:00 +0530592 * byte and offsets 8-14 in the second byte.
593 *
594 * @param[in] offset - offset number.
595 * @param[in/out] resp - get sensor reading response.
596 */
597inline void setOffset(uint8_t offset, ipmi::sensor::GetReadingResponse* resp)
598{
599 if (offset > 7)
600 {
601 resp->assertOffset8_14 |= 1 << (offset - 8);
602 }
603 else
604 {
605 resp->assertOffset0_7 |= 1 << offset;
606 }
607}
608
Tom Josephe4014fc2017-09-06 23:57:36 +0530609/**
610 * @brief Set the reading field in the response.
611 *
612 * @param[in] offset - offset number.
613 * @param[in/out] resp - get sensor reading response.
614 */
615inline void setReading(uint8_t value, ipmi::sensor::GetReadingResponse* resp)
616{
617 resp->reading = value;
618}
619
Tom Joseph295f17e2017-09-07 00:09:46 +0530620/**
621 * @brief Map the value to the assertion bytes. The assertion states are stored
622 * in 2 bytes.
623 *
624 * @param[in] value - value to mapped to the assertion byte.
625 * @param[in/out] resp - get sensor reading response.
626 */
627inline void setAssertionBytes(uint16_t value,
628 ipmi::sensor::GetReadingResponse* resp)
629{
630 resp->assertOffset0_7 = static_cast<uint8_t>(value & 0x00FF);
631 resp->assertOffset8_14 = static_cast<uint8_t>(value >> 8);
632}
633
Tom Josephe05b2922017-09-07 00:43:16 +0530634/**
635 * @brief Set the scanning enabled bit in the response.
636 *
637 * @param[in/out] resp - get sensor reading response.
638 */
639inline void enableScanning(ipmi::sensor::GetReadingResponse* resp)
640{
641 resp->operation = 1 << 6;
642}
643
Tom Joseph816e92b2017-09-06 19:23:00 +0530644} // namespace sensor
645
646} // namespace ipmi
Chris Austenac4604a2015-10-13 12:43:27 -0500647#endif