How to get vehicle state (PX4) from MAVLink?

I’m currently working with Cube Orange and have Latest PX4 firmware.

What I want to do is to make custom UI LED implementation.

led_meanings.gif (500×620)

With STM32F303 board, I can receive MAVLink messages from autopilot.I want to get vehicle state, which determines UI LED’s state and use it to drive my own ARGB LEDs, which are connected to STM32.

Which message or messages should I look at? I’m considering using a flag system to determine LED status. But how can I tell if the vehicle is armed or in error state? Or does such information come directly from MAVLink?