README
SMoSNpm
Javascript utility library for SMoS
Install
npm install smos-js
Usage examples
import { Component } from '@angular/core';
import { SmosJsService } from 'smos-js'
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent {
constructor(private smosService: SmosJsService) {}
public HandleIncomingHexString(hexString: string): SMoSObject | null {
return this.smosService.DecodeMessageFromHexString(hexString);
}
public HandleOutgoingMessage(message: SMoSObject): string {
return this.smosService.EncodeMessageToHexString(message);
}
}