Skip to content

iceoryx_binding_c/user_trigger.h🔗

Types🔗

Name
typedef CLASS UserTrigger * iox_user_trigger_t
user trigger handle

Functions🔗

Name
iox_user_trigger_t iox_user_trigger_init(iox_user_trigger_storage_t * self)
initialize user trigger handle
void iox_user_trigger_deinit(iox_user_trigger_t const self)
deinitialize user trigger handle
void iox_user_trigger_trigger(iox_user_trigger_t const self)
trigger a user trigger
bool iox_user_trigger_has_triggered(iox_user_trigger_t const self)
was the user trigger triggered

Types Documentation🔗

typedef iox_user_trigger_t🔗

typedef CLASS UserTrigger* iox_user_trigger_t;

user trigger handle

Functions Documentation🔗

function iox_user_trigger_init🔗

iox_user_trigger_t iox_user_trigger_init(
    iox_user_trigger_storage_t * self
)

initialize user trigger handle

Parameters:

  • self pointer to preallocated memory of size = sizeof(iox_user_trigger_storage_t)

Return: handle to user trigger

function iox_user_trigger_deinit🔗

void iox_user_trigger_deinit(
    iox_user_trigger_t const self
)

deinitialize user trigger handle

Parameters:

  • self handle to user trigger

function iox_user_trigger_trigger🔗

void iox_user_trigger_trigger(
    iox_user_trigger_t const self
)

trigger a user trigger

Parameters:

  • self handle to user trigger

Note: a user trigger cannot be triggered when it is not attached

function iox_user_trigger_has_triggered🔗

bool iox_user_trigger_has_triggered(
    iox_user_trigger_t const self
)

was the user trigger triggered

Parameters:

  • self handle to user trigger

Return: returns true if the user trigger was triggered, otherwise false

Note: The hasTrigger state will be reset after it was handled by a WaitSet/Listener

Source code🔗

// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved.
// Copyright (c) 2020 - 2021 by Apex.AI Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0

#ifndef IOX_BINDING_C_USER_TRIGGER_H
#define IOX_BINDING_C_USER_TRIGGER_H

#include "iceoryx_binding_c/enums.h"
#include "iceoryx_binding_c/internal/c2cpp_binding.h"
#include "iceoryx_binding_c/types.h"

typedef CLASS UserTrigger* iox_user_trigger_t;

iox_user_trigger_t iox_user_trigger_init(iox_user_trigger_storage_t* self);

void iox_user_trigger_deinit(iox_user_trigger_t const self);

void iox_user_trigger_trigger(iox_user_trigger_t const self);

bool iox_user_trigger_has_triggered(iox_user_trigger_t const self);

#endif

Updated on 2 April 2022 at 16:37:47 CEST