#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
menuconfig DRIVERS_CYPHAL
	bool "Cyphal"
	default n
	---help---
		Enable support for Cyphal

if DRIVERS_CYPHAL
    choice
        prompt "Cyphal Mode"

    config CYPHAL_FMU
        bool "Server (FMU)"

    config CYPHAL_CLIENT
        bool "Client (Peripheral)"

    endchoice

    config CYPHAL_NODE_MANAGER
        bool "Node manager"
        default y
        depends on CYPHAL_FMU
        help
            Implement Cyphal PNP server functionality and manages discovered nodes

    config CYPHAL_NODE_CLIENT
        bool "Node client"
        default y
        depends on CYPHAL_CLIENT
        help
            Implement Cyphal PNP client functionality

    config CYPHAL_APP_DESCRIPTOR
        bool "UAVCAN v0 bootloader app descriptor"
        default n
        depends on CYPHAL_CLIENT && DRIVERS_BOOTLOADERS
        help
            When the board uses the UAVCANv0 bootloader functionality you need a AppImageDescriptor defined


    menu "Publisher support"

        config CYPHAL_GNSS_PUBLISHER
            bool "GNSS Publisher"
            default n

        config CYPHAL_ESC_CONTROLLER
            bool "ESC Controller"
            default n

        config CYPHAL_READINESS_PUBLISHER
            bool "Readiness Publisher"
            default n

        config CYPHAL_UORB_ACTUATOR_OUTPUTS_PUBLISHER
            bool "uORB actuator_outputs publisher"
            default n

        config CYPHAL_UORB_SENSOR_GPS_PUBLISHER
            bool "uORB sensor_gps publisher"
            default n

    endmenu

    menu "Subscriber support"

        config CYPHAL_ESC_SUBSCRIBER
            bool "ESC Subscriber"
            default n

        config CYPHAL_GNSS_SUBSCRIBER_0
            bool "GNSS Subscriber 0"
            default n

        config CYPHAL_GNSS_SUBSCRIBER_1
            bool "GNSS Subscriber 1"
            default n

        config CYPHAL_BMS_SUBSCRIBER
            bool "BMS Subscriber"
            default n

        config CYPHAL_UORB_SENSOR_GPS_SUBSCRIBER
            bool "uORB sensor_gps Subscriber"
            default n
    endmenu

    menu "Advertised Services"
        config CYPHAL_GETINFO_RESPONDER
            bool "GetInfo1.0 responder"
            default y
            help
                Responds to uavcan.node.GetInfo.1.0 request sending over node information
                See https://github.com/UAVCAN/public_regulated_data_types/blob/master/uavcan/node/430.GetInfo.1.0.uavcan for full response

        config CYPHAL_EXECUTECOMMAND_RESPONDER
            bool "ExecuteCommand1.0 responder"
            default n
            help
                To be implemented
    endmenu

    menu "Service invokers"
    endmenu

endif #DRIVERS_CYPHAL
