Skip to content

Commit

Permalink
Support @optional and @extensibility annotations (#208)
Browse files Browse the repository at this point in the history
* Refs #18687. Optional integration

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add optionals

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Move fixed_string to fastcdr

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Support new deserialization of fixed_string

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Update maxSerializedSize to support xcdr

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Adding test for optionals

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Supporting basic optionals

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Remove serialized size calculation

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fixes

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add mutables.

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Improve integration with fastdds

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Remove calculate_serialized_size from the type

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Remove serialize and deserialize functions from type

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Remove key functions from type

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix compilation error

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix max serialized calculation

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Update to new API

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix bitset cdr size calculation

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix wchar_t

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix bitset

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Export serialize functions on windows

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fixes after rebase

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix bitset inheritance

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix windows linkage error

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix windows linkage error

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Stringtemplate 4

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Feature select a group of tests.

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Updated idl files for testing

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fixes

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #19388. Fix including a dependant IDL without structures

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Updated submodule

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Update after changes on CdrSizeCalculator API

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Applying suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Applying suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Update submodules

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Applying suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Update submodules

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Update checkout action to version 4

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Recover auto update submodule

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Update submodules

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix swig generated files

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Improve github action

Signed-off-by: Ricardo González Moreno <[email protected]>

* Update src/main/java/com/eprosima/fastdds/idl/templates/TypesCdrAuxHeader.stg

Co-authored-by: José Luis Bueno López <[email protected]>
Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestion

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Make work again custom stg

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix CI

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix VS template

Signed-off-by: Ricardo González <[email protected]>

* Refs #18687. Fix test on windows

Signed-off-by: Ricardo González <[email protected]>

* Refs #18687. Add custom stg example

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add copyright to custom stg

Signed-off-by: Ricardo González Moreno <[email protected]>

---------

Signed-off-by: Ricardo González Moreno <[email protected]>
Signed-off-by: Ricardo González <[email protected]>
Co-authored-by: José Luis Bueno López <[email protected]>
  • Loading branch information
richiware and JLBuenoLopez committed Sep 12, 2023
1 parent e752b38 commit e9c578a
Show file tree
Hide file tree
Showing 51 changed files with 2,599 additions and 3,131 deletions.
19 changes: 16 additions & 3 deletions .github/actions/fetch-fastddsgen-repos/action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
name: 'fetch-fastddsgen-repos'
description: 'Fetch Fast DDS dependencies'
inputs:
foonathan-memory-vendor-branch:
description: 'foonathan_memory_vendor branch to be used'
required: false
default: 'master'
fastcdr-branch:
description: 'Fast-CDR branch to be used'
required: false
default: 'master'
fastdds-branch:
description: 'Fast-DDS branch to be used'
required: false
default: 'master'
runs:
using: "composite"
steps:
- id: fetch-fastddsgen-repos
run: |
cd src
git clone https://github.com/eProsima/foonathan_memory_vendor.git
git clone https://github.com/eProsima/Fast-CDR.git
git clone https://github.com/eProsima/Fast-DDS.git
git clone https://github.com/eProsima/foonathan_memory_vendor.git --branch ${{ inputs.foonathan-memory-vendor-branch }}
git clone https://github.com/eProsima/Fast-CDR.git --branch ${{ inputs.fastcdr-branch }}
git clone https://github.com/eProsima/Fast-DDS.git --branch ${{ inputs.fastdds-branch }}
cd ..
shell: bash
21 changes: 19 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@ name: Continuous Integration

on:
workflow_dispatch:
inputs:
foonathan_memory_vendor_branch:
description: 'foonathan_memory_vendor branch to be used'
required: false
default: 'master'
fastcdr_branch:
description: 'Fast-CDR branch to be used'
required: false
default: 'master'
fastdds_branch:
description: 'Fast-DDS branch to be used'
required: false
default: 'master'

push:
branches:
Expand All @@ -19,7 +32,7 @@ jobs:
java_version: ['openjdk-11-jdk', 'openjdk-17-jdk', 'openjdk-18-jdk', 'openjdk-19-jdk']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: src/fastddsgen

Expand All @@ -28,11 +41,15 @@ jobs:
java-version: ${{ matrix.java_version }}
- uses: ./src/fastddsgen/.github/actions/install-python-packages
- uses: ./src/fastddsgen/.github/actions/fetch-fastddsgen-repos
with:
foonathan-memory-vendor-branch: '${{ github.event.inputs.foonathan_memory_vendor_branch }}'
fastcdr-branch: '${{ github.event.inputs.fastcdr_branch }}'
fastdds-branch: '${{ github.event.inputs.fastdds_branch }}'

- name: Get minimum supported version of CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.16.3
cmakeVersion: 3.22.6
- name: Use cmake
run: cmake --version

Expand Down
49 changes: 49 additions & 0 deletions resources/Custom.stg
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright 2023 Proyectos y Sistemas de Mantenimiento SL (eProsima).

main(ctx, definitions) ::= <<

$definitions; separator="\n"$

>>

module(ctx, parent, module, definition_list) ::= <<

$definition_list$

>>

definition_list(definitions) ::= <<

$definitions; separator="\n"$

>>

annotation(ctx, annotation) ::= <<>>

const_decl(ctx, parent, const) ::= <<>>

typedef_decl(ctx, parent, typedefs) ::= <<>>

fwd_decl(ctx, parent, type) ::= <<>>

struct_type(ctx, parent, struct) ::= <<>>

union_type(ctx, parent, union, extensions) ::= <<>>

bitset_type(ctx, parent, bitset, extensions) ::= <<>>

enum_type(ctx, parent, enum) ::= <<>>

bitmask_type(ctx, parent, bitmask) ::= <<>>

interface(ctx, parent, interface, export_list) ::= <<>>

export_list(exports) ::= <<>>

exception(ctx, parent, exception) ::= <<>>

operation(ctx, parent, operation, param_list) ::= <<>>

param_list(parameters) ::= <<>>

param(parameter) ::= <<>>
Loading

0 comments on commit e9c578a

Please sign in to comment.