Gs1Message

Validated GS1 data ready to be encoded in a GS1-128 or GS1 DataMatrix symbol.

val message = Gs1Message.of("01" to "09501101020917", "17" to "190508", "10" to "ABCD1234", "21" to "10")
message.humanReadable // (01)09501101020917(17)190508(10)ABCD1234(21)10
message.tokens // [Fnc1, 01095011010209171719050810ABCD1234, Fnc1, 2110]

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Element strings in encoding order.

Link copied to clipboard

Human readable interpretation, e.g. (01)09501101020917(10)ABCD1234.

Link copied to clipboard

The symbol content: a leading Gs1Token.Fnc1, the data, and an FNC1 separator after every element string that is not predefined-length, except the last one.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
operator fun get(code: String): String?

Returns the value of the first element with this AI code, or null.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun Gs1Message.toDigitalLinkUri(domain: String = Gs1DigitalLink.CANONICAL_DOMAIN): String

The GS1 Digital Link URI of this message. See Gs1DigitalLink.toUri.

Link copied to clipboard
fun toElementString(separator: Char = GROUP_SEPARATOR, symbologyIdentifier: String = ""): String

The data as a barcode reader transmits it: separators as separator (ASCII GS by default), no leading FNC1, optionally prefixed with a symbologyIdentifier such as ]d2 or ]C1.

Link copied to clipboard
open override fun toString(): String