Skip to content

Instantly share code, notes, and snippets.

public class Struct {
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Unsigned {
}
public void encode(ByteBuffer buffer) {
for (Field field : this.getClass().getDeclaredFields()) {
try {
Object value = field.get(this);
#include "TaggedPointer.h"
#include <stdlib.h>
#include <stdio.h>
typedef struct Header {
const void* tag;
} Header;
Header* base(void *tagged) {
#include "Boolean.h"
struct Boolean Boolean = {
0,
1,
};
#include "Bus.h"
#include <memory.h>
typedef struct SubscriptionList {
Subscription subscriptions[MAX_SUBSCRIBERS_PER_TOPIC];
} SubscriptionList;
typedef struct Topic {
char* topicString;