OpenBIC
OpenSource Bridge-IC
plat_status.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef PLAT_STATUS_H
18#define PLAT_STATUS_H
19
20#include <stdint.h>
21#include "plat_util.h"
22#include "plat_threshold.h"
23
25 RPU_FAN_STATUS, // 0x900E
30 ALL_PUMP_STATUS, // 0x9018
32 PUMP_FAN_STATUS, // 0xA080
37 HEX_FAN_ALARM_1, // 0x9203
38 HEX_FAN_ALARM_2, // 0xA201
44};
45
60};
61
68};
69
78};
79
89};
90
97};
98
100 // 0
112 // 100
120};
121
126};
127
131};
132
133uint32_t get_status_flag(uint8_t idx);
134void set_status_flag(uint8_t idx, uint8_t bit, uint32_t val);
135uint16_t get_sticky_sensor_status(uint8_t idx);
136bool set_sticky_sensor_status(uint8_t idx, uint16_t val);
138
139#endif //PLAT_STATUS_H
uint8_t idx
Definition: plat_util.c:39
uint32_t val
Definition: plat_util.c:40
uint8_t status
Definition: mctp_ctrl.h:1
PUMP_STATUS_E
Definition: plat_status.h:62
@ PUMP_STATUS_MAINTAIN
Definition: plat_status.h:66
@ PUMP_STATUS_ABNORMAL
Definition: plat_status.h:67
@ PUMP_STATUS_DISABLE
Definition: plat_status.h:63
@ PUMP_STATUS_REDAUNDANT
Definition: plat_status.h:64
@ PUMP_STATUS_ENABLE
Definition: plat_status.h:65
DEBUG_MODE_STATUS_E
Definition: plat_status.h:128
@ DEBUG_MODE_MAX
Definition: plat_status.h:130
@ DEBUG_MODE_PUMP_THRESHOLD
Definition: plat_status.h:129
STATUS_FLAG_E
Definition: plat_status.h:80
@ STATUS_FLAG_SYSTEM_READY
Definition: plat_status.h:85
@ STATUS_FLAG_SETPOINT_FLAG
Definition: plat_status.h:86
@ STATUS_FLAG_FAILURE
Definition: plat_status.h:82
@ STATUS_FLAG_LEAK
Definition: plat_status.h:81
@ STATUS_FLAG_AUTO_TUNE
Definition: plat_status.h:83
@ STATUS_FLAG_PUMP_REDUNDANT
Definition: plat_status.h:84
@ STATUS_FLAG_MAX
Definition: plat_status.h:88
@ STATUS_FLAG_DEBUG_MODE
Definition: plat_status.h:87
bool set_sticky_sensor_status(uint8_t idx, uint16_t val)
Definition: plat_status.c:61
uint16_t get_sticky_sensor_status(uint8_t idx)
Definition: plat_status.c:45
void set_status_flag(uint8_t idx, uint8_t bit, uint32_t val)
Definition: plat_status.c:36
SETPOINT_FLAG_STATUS_E
Definition: plat_status.h:122
@ SETPOINT_FLAG_LPM
Definition: plat_status.h:123
@ SETPOINT_FLAG_OUTLET_TEMP
Definition: plat_status.h:124
@ SETPOINT_FLAG_MAX
Definition: plat_status.h:125
uint16_t get_sensor_status_for_modbus_cmd(uint8_t status)
Definition: plat_status.c:80
PUMP_REDUNDANT_STATUS_E
Definition: plat_status.h:91
@ PUMP_REDUNDANT_DISABLE
Definition: plat_status.h:92
@ PUMP_REDUNDANT_12
Definition: plat_status.h:93
@ PUMP_REDUNDANT_13
Definition: plat_status.h:94
@ PUMP_REDUNDANT_MAX
Definition: plat_status.h:96
@ PUMP_REDUNDANT_23
Definition: plat_status.h:95
FAILURE_STATUS_E
Definition: plat_status.h:99
@ PUMP_FAIL_PUMP1_UCR
Definition: plat_status.h:107
@ PUMP_FAIL_PUMP2_UCR
Definition: plat_status.h:108
@ PUMP_FAIL_ABNORMAL_FLOW_RATE
Definition: plat_status.h:104
@ PUMP_FAIL_CLOSE_PUMP
Definition: plat_status.h:111
@ PUMP_FAIL_LOW_LEVEL
Definition: plat_status.h:105
@ PUMP_FAIL_ABNORMAL_PRESS
Definition: plat_status.h:103
@ PUMP_FAIL_FLOW_RATE_NOT_ACCESS
Definition: plat_status.h:117
@ FAILURE_STATUS_MAX
Definition: plat_status.h:119
@ PUMP_FAIL_EMERGENCY_BUTTON
Definition: plat_status.h:101
@ PUMP_FAIL_LEAK
Definition: plat_status.h:102
@ PUMP_FAIL_TWO_HEX_FAN_FAILURE
Definition: plat_status.h:113
@ PUMP_FAIL_ABNORMAL_AIR_INLET_TEMP
Definition: plat_status.h:116
@ PUMP_FAIL_ABNORMAL_COOLANT_INLET_TEMP
Definition: plat_status.h:114
@ PUMP_FAIL_TWO_PUMP_LCR
Definition: plat_status.h:110
@ PUMP_FAIL_ABNORMAL_COOLANT_OUTLET_TEMP
Definition: plat_status.h:115
@ PUMP_FAIL_LOW_RPU_LEVEL
Definition: plat_status.h:106
@ HEX_FAN_FAIL_COOLANT_OUTLET_TEMP_NOT_ACCESS
Definition: plat_status.h:118
@ PUMP_FAIL_PUMP3_UCR
Definition: plat_status.h:109
uint32_t get_status_flag(uint8_t idx)
Definition: plat_status.c:31
AALC_MODBUS_SENSOR_STATUS_E
Definition: plat_status.h:24
@ ALL_RPU_INTERNAL_FAN_STATUS
Definition: plat_status.h:31
@ RPU_PUMP1_STATUS
Definition: plat_status.h:26
@ HSC_POWER_STATUS
Definition: plat_status.h:40
@ HEX_FAN_ALARM_2
Definition: plat_status.h:38
@ HSC_COMMS_STATUS
Definition: plat_status.h:42
@ RPU_PUMP3_STATUS
Definition: plat_status.h:28
@ HEX_FAN_COMMS_ALARM
Definition: plat_status.h:39
@ HEX_BLADDER_LEVEL_STATUS
Definition: plat_status.h:33
@ FB_HSC_COMMS_STATUS
Definition: plat_status.h:43
@ ALL_PUMP_STATUS
Definition: plat_status.h:30
@ AALC_STATUS_ALARM
Definition: plat_status.h:36
@ RPU_PUMP2_STATUS
Definition: plat_status.h:27
@ RPU_RESERVOIR_STATUS
Definition: plat_status.h:29
@ PUMP_FAN_STATUS
Definition: plat_status.h:32
@ FB_HSC_POWER_STATUS
Definition: plat_status.h:41
@ HEX_AIR_THERMOMETER_STATUS
Definition: plat_status.h:35
@ RPU_FAN_STATUS
Definition: plat_status.h:25
@ AALC_SENSOR_ALARM
Definition: plat_status.h:34
@ HEX_FAN_ALARM_1
Definition: plat_status.h:37
AALC_STICKY_STATUS_E
Definition: plat_status.h:46
@ STICKY_HEX_RACK_PAN_LEAKAGE_RELAY
Definition: plat_status.h:57
@ STICKY_RPU_INTERNAL_LEAKAGE_ABNORMAL
Definition: plat_status.h:51
@ STICKY_HEX_RACK_PAN_LEAKAGE
Definition: plat_status.h:55
@ STICKY_ITRACK_CHASSIS0_LEAKAGE
Definition: plat_status.h:47
@ STICKY_ITRACK_CHASSIS3_LEAKAGE
Definition: plat_status.h:50
@ STICKY_STATUS_MAX
Definition: plat_status.h:59
@ STICKY_RPU_EXTERNAL_LEAKAGE_ABNORMAL
Definition: plat_status.h:52
@ STICKY_HEX_RACK_FLOOR_LEAKAGE_RELAY
Definition: plat_status.h:58
@ STICKY_RPU_OPT_EXTERNAL_LEAKAGE2_ABNORMAL
Definition: plat_status.h:54
@ STICKY_ITRACK_CHASSIS2_LEAKAGE
Definition: plat_status.h:49
@ STICKY_ITRACK_CHASSIS1_LEAKAGE
Definition: plat_status.h:48
@ STICKY_RPU_OPT_EXTERNAL_LEAKAGE1_ABNORMAL
Definition: plat_status.h:53
@ STICKY_HEX_RACK_FLOOR_LEAKAGE
Definition: plat_status.h:56
AALC_STATUS_LEAK_E
Definition: plat_status.h:70
@ AALC_STATUS_IT_LEAK_3
Definition: plat_status.h:74
@ AALC_STATUS_IT_LEAK_1
Definition: plat_status.h:72
@ AALC_STATUS_IT_LEAK_2
Definition: plat_status.h:73
@ AALC_STATUS_IT_LEAK_0
Definition: plat_status.h:71
@ AALC_STATUS_RACK_LEAKAGE
Definition: plat_status.h:76
@ AALC_STATUS_LEAK_E_MAX
Definition: plat_status.h:77
@ AALC_STATUS_CDU_LEAKAGE
Definition: plat_status.h:75