Lely core libraries  2.2.5
type.c File Reference
#include "co.h"
#include <lely/co/type.h>
#include <lely/co/def/basic.def>
#include <lely/co/def/type.def>
Include dependency graph for type.c:

Go to the source code of this file.

Functions

int co_type_is_basic (co_unsigned16_t type)
 Returns 1 if the specified (static) data type is a basic type, and 0 if not.
 
int co_type_is_array (co_unsigned16_t type)
 Returns 1 if the specified (static) data type is an array, and 0 if not.
 
size_t co_type_sizeof (co_unsigned16_t type)
 Returns the native size (in bytes) of a value of the specified data type, or 0 if it is not a static data type. More...
 
size_t co_type_alignof (co_unsigned16_t type)
 Returns the alignment requirements (in bytes) of a value of the specified data type, or 0 if it is not a static data type. More...
 

Detailed Description

This file is part of the CANopen library; it contains the implementation of the CANopen type functions.

See also
lely/co/type.h
Author
J. S. Seldenthuis jseld.nosp@m.enth.nosp@m.uis@l.nosp@m.ely..nosp@m.com

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.

Definition in file type.c.

Function Documentation

◆ co_type_sizeof()

size_t co_type_sizeof ( co_unsigned16_t  type)

Returns the native size (in bytes) of a value of the specified data type, or 0 if it is not a static data type.

In case of strings or domains, this function returns the size of a pointer.

See also
co_type_alignof()

Definition at line 52 of file type.c.

◆ co_type_alignof()

size_t co_type_alignof ( co_unsigned16_t  type)

Returns the alignment requirements (in bytes) of a value of the specified data type, or 0 if it is not a static data type.

In case of strings or domains, this function returns the alignment requirements of a pointer.

See also
co_type_sizeof()

Definition at line 65 of file type.c.