#!/usr/bin/perl -w # # Submit OASIS download info to SSDS # Typically called from getM1 and getM2. "devices" must be set up in SSDS first. # is the "device" for getM1 (1698) or getM2 (1699) # \n\nPut in double quotes if it contains whitespace.\n\n" unless $#ARGV == 2; my $deviceId = $ARGV[0]; my $parentId = $ARGV[1]; my $packetType = 1; my $packetSubType = 1; my $dataDescriptionId = 1; my $dataDescriptionVersion = 1; my $timestampSeconds = time(); # For test purposes, make the timestamp 'now' on every packet my $timestampNanoseconds = 123000000; my $sequenceNumber = 1; my $bufferBytes = $ARGV[2]; my $bufferLen = length($bufferBytes); my $bufferTwoBytes = "Second Buffer"; my $bufferTwoLen = length($bufferTwoBytes); my $bytesSubmitted = SSDSSubmit::submitSsdsRecord($deviceId,$parentId,$packetType,$packetSubType, $dataDescriptionId,$dataDescriptionVersion,$timestampSeconds,$timestampNanoseconds, $sequenceNumber,$bufferLen,$bufferBytes); if ($bytesSubmitted >= 0) { print "Device $deviceId data record of $bytesSubmitted bytes submitted to SSDS.\n"; } else { print "Data record from device $deviceId not successfully submitted.\n" ; }