Program Listing for File ipc.idl#

Return to documentation for file (interfaces\ipc.idl)

 /********************************************************************************
 * Copyright (c) 2025-2026 ZF Friedrichshafen AG
 *
 * This program and the accompanying materials are made available under the
 * terms of the Apache License Version 2.0 which is available at
 * https://www.apache.org/licenses/LICENSE-2.0
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Contributors:
 *   Erik Verhoeven - initial API and implementation
 ********************************************************************************/

#include "core.idl"

module sdv
{
    module ipc
    {
        struct SChannelEndpoint
        {
            IInterfaceAccess  pConnection;
            u8string          ssConnectString;
        };

        interface ICreateEndpoint
        {
            SChannelEndpoint CreateEndpoint(in u8string ssChannelConfig);
        };

        interface IChannelAccess
        {
            IInterfaceAccess Access(in u8string ssConnectString);
        };

        enum EConnectState : uint32
        {
            uninitialized = 0,
            initializing = 1,
            initialized = 2,
            connecting = 10,
            negotiating = 20,
            connection_error = 990,
            connected = 11,
            communication_error = 991,
            disconnected = 30,
            disconnected_forced = 32,
            terminating = 90,
        };

        interface IConnect
        {
            boolean AsyncConnect(in IInterfaceAccess pReceiver);

            boolean WaitForConnection(in uint32 uiWaitMs);

            void CancelWait();

            void Disconnect();

            uint64 RegisterStateEventCallback(in IInterfaceAccess pEventCallback);

            void UnregisterStateEventCallback(in uint64 uiCookie);

            EConnectState GetConnectState() const;
        };

        interface IConnectEventCallback
        {
            void SetConnectState(in EConnectState eConnectState);
        };

        interface IDataSend
        {
            boolean SendData(inout sequence<pointer<uint8>> seqData);
        };

        interface IDataReceiveCallback
        {
            void ReceiveData(inout sequence<pointer<uint8>> seqData);
        };
    }; // module ipc
}; // module sdv