Skip to content

Commit

Permalink
Add SenML Cbor content Format.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernard31 committed Nov 25, 2020
1 parent 776c513 commit 760faef
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -30,6 +30,7 @@ public class ContentFormat {
public static final int OLD_TLV_CODE = 1542;

public static final int SENML_JSON_CODE = 110;
public static final int SENML_CBOR_CODE = 112;

public static final ContentFormat TLV = new ContentFormat("TLV", "application/vnd.oma.lwm2m+tlv", TLV_CODE);
public static final ContentFormat JSON = new ContentFormat("JSON", "application/vnd.oma.lwm2m+json", JSON_CODE);
Expand All @@ -38,11 +39,13 @@ public class ContentFormat {
public static final ContentFormat LINK = new ContentFormat("LINK", "application/link-format", LINK_CODE);
public static final ContentFormat SENML_JSON = new ContentFormat("SENML_JSON", "application/senml+json",
SENML_JSON_CODE);
public static final ContentFormat SENML_CBOR = new ContentFormat("SENML_CBOR", "application/senml+cbor",
SENML_CBOR_CODE);

public static final ContentFormat DEFAULT = TLV;

private static final ContentFormat knownContentFormat[] = new ContentFormat[] { TLV, JSON, SENML_JSON, TEXT, OPAQUE,
LINK };
private static final ContentFormat knownContentFormat[] = new ContentFormat[] { TLV, JSON, SENML_JSON, SENML_CBOR,
TEXT, OPAQUE, LINK };

private final String name;
private final String mediaType;
Expand Down

0 comments on commit 760faef

Please sign in to comment.