Coder Social home page Coder Social logo

alljoyn-testing-service's Introduction

alljoyn-testing-service

Testing service for messages marshalling and unmarshalling.

Implementation Notes

After cloning this repository, a developer needs to get ajtcl by running these commands in the project root folder:

$ git clone https://git.allseenalliance.org/gerrit/core/ajtcl
$ git -C ajtcl checkout RB14.12

Increase the size of rxData and txData buffers so that message is big enough to handle complex signatures:

\\ ---------------------------------------
\\ In aj_net.c
\\ ---------------------------------------
/*
 * Statically sized buffers for I/O
 */
#define MESSAGE_BUFFER_SIZE 30000
static uint8_t rxData[MESSAGE_BUFFER_SIZE];
static uint8_t txData[MESSAGE_BUFFER_SIZE];

Service info

  • Service name: "org.alljoyn.Bus.TestService"
  • Service path: "/test"
  • Service port: 25
  • Interface name:
static const char* testInterface[] = 
{
	"org.alljoyn.Bus.TestService",
	"?Get <sas >v", // <s: signature, <as: array of variant's signature (optional), >v: returned arguments basing on signature
	"?Set <v >v", // <v: signature and input arguments, >v: returned arguments
	NULL
};
  • Sample usage for sending a marshalling request (using Set method at index 1):
var args =
[
	"(bynqasiuxtdoaxada{sv}ns)",
	false,
	-127,
	-12345,
	54321,
	["String element 0", "String element 1", "String element 2", "String element 3", "String element 4"],
	-1234567,
	1234567,
	-1234567890,
	1234567890,
	123.456,
	"/test",
	[-5555555555, -4444444444, -3333333333, -2222222222, -1111111111, 0, 1111111111, 2222222222, 3333333333, 4444444444, 5555555555],
	[-555.555, -444.444, -333.333, -222.222, -111.111, 0, 111.111, 222.222, 333.333, 444.444, 555.555],
	[["Element 0: s", "s", "Element 0: s: v => 's'"], ["Element 1: s", "b", true], ["Element 2: s", "i", -10000], ["Element 3: s", "n", 12345], ["Element 4: s", "t", 54321]],
	10000,
	"String end"
];

status = AllJoynWinRTComponent.AllJoyn.aj_MarshalArgs(msg, "v", args);

How to build

alljoyn-testing-service's People

Contributors

phongcao avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.