struct ta_reboot_context

Overview

Contextual information for rebooting the agent More…

#include <rcf.h>

struct ta_reboot_context {
    // fields

    ta_reboot_state state;
    int requested_types;
    int allowed_types;
    ta_reboot_type current_type;
    time_t reboot_timestamp;
    usrreq* req;
    te_bool is_answer_recv;
    te_errno error;
    te_bool is_agent_reboot_msg_sent;
    unsigned int restart_attempt;
    te_bool is_cold_reboot_time_expired;
};

Detailed Documentation

Contextual information for rebooting the agent

Fields

ta_reboot_state state

Current reboot state

int requested_types

Bitmask of the requested reboot types by the user

int allowed_types

Bitmask of the allowed reboot types by the user

ta_reboot_type current_type

Current reboot type. The current reboot type will increase to the requested type according to the Reboot types are enumerated from the lowest one up to requested_type until until one of them completes successfully

time_t reboot_timestamp

Timestamp of one reboot state

usrreq* req

User request with reboot message

te_bool is_answer_recv

The flag to check that the response from the agent is received. Use for the reboot context only.

te_errno error

The error that occurred during the reboot

te_bool is_agent_reboot_msg_sent

This field is used to avoid a lot of message “Agent in the reboot state” in the logs

unsigned int restart_attempt

Number of agent restart attempts

te_bool is_cold_reboot_time_expired

The flag to check that timeout for cold reboot is expired