Skip to content

Commit

Permalink
Release v2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Acuadros95 authored Jul 10, 2023
2 parents 29c0b2c + 2b68016 commit b419068
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 22 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
apply plugin: 'java-library'
apply plugin: 'eclipse' // Eclipse integration

version = '2.0.0'
version = '2.0.1'
description = 'Build script with all necessary tasks to compile and test MicroXRCEDDSGen'

repositories {
mavenCentral()
}

dependencies {
implementation files('thirdparty/IDL-Parser/build/libs/idlparser-1.5.0.jar')
implementation files('thirdparty/IDL-Parser/build/libs/idlparser-1.6.0.jar')
testImplementation('org.junit.jupiter:junit-jupiter-api:5.5.2')
testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine:5.5.2')
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/eprosima/uxr/idl/grammar/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class Context extends com.eprosima.idl.context.Context implements com.epr
{
public Context(String filename, String file, ArrayList<String> includePaths, boolean subscribercode, boolean publishercode)
{
super(filename, file, includePaths);
super(file, includePaths);
m_fileNameUpper = filename.toUpperCase();
m_subscribercode = subscribercode;
m_publishercode = publishercode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ topic->$name$_size = $typecode.maxsize$ / 2;
$if(typecode.contentTypeCode.primitive)$
memset(topic->$name$, rand(), topic->$name$_size * $typecode.contentTypeCode.size$);
$else$
for(int i = 0; i < topic->$name$_size; ++i)
for(size_t i = 0; i < topic->$name$_size; ++i)
{
$member_assignment(typecode=typecode.contentTypeCode, name=indexName(name=name), originName=name)$
}
Expand All @@ -109,12 +109,12 @@ for(int i$length(dimensions)$ = 0; i$length(dimensions)$ < sizeof(topic->$name$)
$elseif(typecode.contentTypeCode.primitive)$
memset(topic->$name$, rand(), sizeof(topic->$name$));
$elseif(typecode.contentTypeCode.isType_d)$
for(int i = 0; i < sizeof(topic->$name$) / $typecode.contentTypeCode.maxsize$; ++i)
for(size_t i = 0; i < sizeof(topic->$name$) / $typecode.contentTypeCode.maxsize$; ++i)
{
$member_assignment(typecode=typecode.contentTypeCode, name=indexName(name=name), originName=name)$
}
$else$
for(int i = 0; i < sizeof(topic->$name$) / sizeof($typecode.cTypename$); ++i)
for(size_t i = 0; i < sizeof(topic->$name$) / sizeof($typecode.cTypename$); ++i)
{
$member_assignment(typecode=typecode.contentTypeCode, name=indexName(name=name), originName=name)$
}
Expand Down Expand Up @@ -145,7 +145,7 @@ printf("$name$: ");
$print_sequence(name)$
$else$
printf("$name$: \n");
for(int i = 0; i < topic->$name$_size; ++i)
for(size_t i = 0; i < topic->$name$_size; ++i)
{
$member_print(typecode=typecode.contentTypeCode, name=indexName(name=name), originName=name)$
}
Expand All @@ -164,29 +164,29 @@ printf("$name$: ");
$print_array(typecode=typecode, name=name)$
$elseif(typecode.contentTypeCode.isType_d)$
printf("$name$: \n");
for(int i = 0; i < sizeof(topic->$name$) / $typecode.contentTypeCode.maxsize$; ++i)
for(size_t i = 0; i < sizeof(topic->$name$) / $typecode.contentTypeCode.maxsize$; ++i)
{
$member_print(typecode=typecode.contentTypeCode, name=indexName(name=name), originName=name)$
}
$else$
printf("$name$: \n");
for(int i = 0; i < sizeof(topic->$name$) / sizeof($typecode.cTypename$); ++i)
for(size_t i = 0; i < sizeof(topic->$name$) / sizeof($typecode.cTypename$); ++i)
{
$member_print(typecode=typecode.contentTypeCode, name=indexName(name=name), originName=name)$
}
$endif$
>>

print_sequence(name) ::= <<
for(int i = 0; i < topic->$name$_size; ++i)
for(size_t i = 0; i < topic->$name$_size; ++i)
{
printf("%" PRIx64 " ", (uint64_t)topic->$name$[i]);
}
printf("\n");
>>

print_array(typecode, name) ::= <<
for(int i = 0; i < sizeof(topic->$name$) / sizeof($typecode.cTypename$); ++i)
for(size_t i = 0; i < sizeof(topic->$name$) / sizeof($typecode.cTypename$); ++i)
{
printf("%" PRIx64 " ", (uint64_t)topic->$name$[i]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int test$ctx.lastStructure.cScopedname$()
printf("ucdrBuffer: \n");
printf("length: %d\n", buffer_length);
printf("data: ");
for(int i = 0; i < buffer_length; ++i)
for(size_t i = 0; i < buffer_length; ++i)
{
printf("%02X ", mb.init[i]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ $if(typecode.contentTypeCode.primitive)$
success &= ucdr_serialize_sequence_$typecode.cTypename$(writer, topic->$name$, topic->$name$_size);
$else$
success &= ucdr_serialize_uint32_t(writer, topic->$name$_size);
for(int i = 0; i < topic->$name$_size; ++i)
for(size_t i = 0; i < topic->$name$_size; ++i)
{
$member_serialization(ctx=ctx, typecode=typecode.contentTypeCode, name=indexName(name=name), originName=name)$
}
Expand All @@ -140,12 +140,12 @@ for(int i$length(dimensions)$ = 0; i$length(dimensions)$ < sizeof(topic->$name$)
$elseif(typecode.contentTypeCode.primitive)$
success &= ucdr_serialize_array_$typecode.cTypename$(writer, topic->$name$, sizeof(topic->$name$) / sizeof($typecode.cTypename$));
$elseif(typecode.contentTypeCode.isType_d)$
for(int i = 0; i < sizeof(topic->$name$) / $typecode.contentTypeCode.maxsize$; ++i)
for(size_t i = 0; i < sizeof(topic->$name$) / $typecode.contentTypeCode.maxsize$; ++i)
{
$member_serialization(ctx=ctx, typecode=typecode.contentTypeCode, name=indexName(name=name), originName=originName)$
}
$else$
for(int i = 0; i < sizeof(topic->$name$) / sizeof($typecode.cTypename$); ++i)
for(size_t i = 0; i < sizeof(topic->$name$) / sizeof($typecode.cTypename$); ++i)
{
$member_serialization(ctx=ctx, typecode=typecode.contentTypeCode, name=indexName(name=name), originName=originName)$
}
Expand Down Expand Up @@ -182,7 +182,7 @@ if(topic->$name$_size > $typecode.maxsize$)
}
else
{
for(int i = 0; i < topic->$name$_size; ++i)
for(size_t i = 0; i < topic->$name$_size; ++i)
{
$member_deserialization(ctx=ctx, typecode=typecode.contentTypeCode, name=indexName(name=name), originName=name)$
}
Expand All @@ -199,12 +199,12 @@ for(int i$length(dimensions)$ = 0; i$length(dimensions)$ < sizeof(topic->$name$)
$elseif(typecode.contentTypeCode.primitive)$
success &= ucdr_deserialize_array_$typecode.cTypename$(reader, topic->$name$, sizeof(topic->$name$) / sizeof($typecode.cTypename$));
$elseif(typecode.contentTypeCode.isType_d)$
for(int i = 0; i < sizeof(topic->$name$) / $typecode.contentTypeCode.maxsize$; ++i)
for(size_t i = 0; i < sizeof(topic->$name$) / $typecode.contentTypeCode.maxsize$; ++i)
{
$member_deserialization(ctx=ctx, typecode=typecode.contentTypeCode, name=indexName(name=name), originName=originName)$
}
$else$
for(int i = 0; i < sizeof(topic->$name$) / sizeof($typecode.cTypename$); ++i)
for(size_t i = 0; i < sizeof(topic->$name$) / sizeof($typecode.cTypename$); ++i)
{
$member_deserialization(ctx=ctx, typecode=typecode.contentTypeCode, name=indexName(name=name), originName=originName)$
}
Expand Down Expand Up @@ -233,7 +233,7 @@ size += ucdr_alignment(size, 4) + 4;
$if(typecode.contentTypeCode.primitive)$
size += ucdr_alignment(size, $typecode.contentTypeCode.size$) + topic->$name$_size * $typecode.contentTypeCode.size$;
$else$
for(int i = 0; i < topic->$name$_size; ++i)
for(size_t i = 0; i < topic->$name$_size; ++i)
{
$member_size(ctx=ctx, typecode=typecode.contentTypeCode, name=indexName(name=name), originName=name)$
}
Expand All @@ -249,12 +249,12 @@ for(int i$length(dimensions)$ = 0; i$length(dimensions)$ < sizeof(topic->$name$)
$elseif(typecode.contentTypeCode.primitive)$
size += ucdr_alignment(size, $typecode.contentTypeCode.size$) + sizeof(topic->$name$);
$elseif(typecode.contentTypeCode.isType_d)$
for(int i = 0; i < sizeof(topic->$name$) / $typecode.contentTypeCode.maxsize$; ++i)
for(size_t i = 0; i < sizeof(topic->$name$) / $typecode.contentTypeCode.maxsize$; ++i)
{
$member_size(ctx=ctx, typecode=typecode.contentTypeCode, name=indexName(name=name), originName=originName)$
}
$else$
for(int i = 0; i < sizeof(topic->$name$) / sizeof($typecode.cTypename$); ++i)
for(size_t i = 0; i < sizeof(topic->$name$) / sizeof($typecode.cTypename$); ++i)
{
$member_size(ctx=ctx, typecode=typecode.contentTypeCode, name=indexName(name=name), originName=originName)$
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public void runTests()
IDL.COVERAGE_COMPLEX,
IDL.FORWARD_DECLS,
IDL.NEW_FEATURES_4_2,
IDL.ARRAY_MULTI_DIM,
IDL.SEQUENCE_BASIC_IN_MODULE_TYPEDEF,
IDL.SEQUENCE_CUSTOM_IN_MODULE_TYPEDEF,
IDL.SEQUENCE_STRING_IN_MODULE_TYPEDEF,
Expand Down

0 comments on commit b419068

Please sign in to comment.