Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Need help to generate an id with standard DPP

2 posts in General Discussion Last posting was on 2007-06-28 08:28:31.0Z
Alexandre Marcy Posted on 2007-06-27 14:03:09.0Z
Sender: 7c1a.468250a5.1804289383@sybase.com
From: Alexandre Marcy
Newsgroups: ianywhere.public.rfidanywhere.general
Subject: Need help to generate an id with standard DPP
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46826e1d.7f07.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 27 Jun 2007 07:03:09 -0700
X-Trace: forums-1-dub 1182952989 10.22.241.41 (27 Jun 2007 07:03:09 -0700)
X-Original-Trace: 27 Jun 2007 07:03:09 -0700, 10.22.241.41
Lines: 44
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.rfidanywhere.general:408
Article PK: 10068

Hi,

I'm writing a BM to print tag. In order to generate an ID, i
use the standard DPP (called RA_DPP).
You could find below the code to write the tag.
Buut, as you can see with the log, i've got an unnatended
exception.
Could you help me?

Thanks,

Alexandre

THE CODE:

try
{
uint generalManager = (uint)pgeneralManager;
uint objectClass = (uint)pobjectClass;
uint serialNumber = (uint)pserialNumber;
RFIDTagEPC_Class1G2 tag = new RFIDTagEPC_Class1G2();
RnInfo info = new RnInfo();
info.Add("GeneralManagerNumber",(uint)1001);
info.Add("ObjectClass",(uint)1002);
info.Add("SerialNumber",(uint)1003);
tag =
dppStd.Encode(info,typeof(iAnywhere.RfidNet.DPP.RFIDEPC_GID96Info))
as RFIDTagEPC_Class1G2;
TraceLog.WriteVerbose("Pret a envoyer");
TraceLog.WriteVerbose("Id a envoyer :"+tag.ID);
return ((RFIDTagEPC_Class1G2)tag).ID;
}
catch (Exception exe)
{
TraceLog.WriteError("Erreur d'encodage :",exe);
return "";
}

THE LOG TRACE

4:00:43.8125000 PM Verbose Pret a envoyer
4:00:43.8125000 PM Error Erreur d'encodage : : La
référence d'objet n'est pas définie à une instance
d'un objet.


David Posted on 2007-06-28 08:28:31.0Z
From: "David" <dNtOoSrPrAeMci@sybase.com>
Newsgroups: ianywhere.public.rfidanywhere.general
References: <46826e1d.7f07.1681692777@sybase.com>
Subject: Re: Need help to generate an id with standard DPP
Lines: 76
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: dtorreci-xp.sybase.com
X-Original-NNTP-Posting-Host: dtorreci-xp.sybase.com
Message-ID: <4683712f$1@forums-1-dub>
Date: 28 Jun 2007 01:28:31 -0700
X-Trace: forums-1-dub 1183019311 10.49.112.135 (28 Jun 2007 01:28:31 -0700)
X-Original-Trace: 28 Jun 2007 01:28:31 -0700, dtorreci-xp.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.rfidanywhere.general:411
Article PK: 18982

Hi Alenxandre,

seems that your dppStd is not correcctly set.

IDPP dpp = null;
try
{
if( dpp == null )
{
dpp = DPPManager.Load( "RA_DPP" ) as IDPP;
}

if( dpp == null )
throw new Exception( "No DPP found" );

RnInfo info = new RnInfo();
info.Add( field1, value1);
info.Add( field1, value2);
info.Add( field1, value3);
info.Add( field1, value4);

RFIDTag180006B tag = dpp.Encode( info ) as RFIDTag180006B;

Try in this way, if still does not work, please contact me at my email.

Regards,
D

<Alexandre Marcy> wrote in message
news:46826e1d.7f07.1681692777@sybase.com...
Hi,

I'm writing a BM to print tag. In order to generate an ID, i
use the standard DPP (called RA_DPP).
You could find below the code to write the tag.
Buut, as you can see with the log, i've got an unnatended
exception.
Could you help me?

Thanks,

Alexandre

THE CODE:

try
{
uint generalManager = (uint)pgeneralManager;
uint objectClass = (uint)pobjectClass;
uint serialNumber = (uint)pserialNumber;
RFIDTagEPC_Class1G2 tag = new RFIDTagEPC_Class1G2();
RnInfo info = new RnInfo();
info.Add("GeneralManagerNumber",(uint)1001);
info.Add("ObjectClass",(uint)1002);
info.Add("SerialNumber",(uint)1003);
tag =
dppStd.Encode(info,typeof(iAnywhere.RfidNet.DPP.RFIDEPC_GID96Info))
as RFIDTagEPC_Class1G2;
TraceLog.WriteVerbose("Pret a envoyer");
TraceLog.WriteVerbose("Id a envoyer :"+tag.ID);
return ((RFIDTagEPC_Class1G2)tag).ID;
}
catch (Exception exe)
{
TraceLog.WriteError("Erreur d'encodage :",exe);
return "";
}

THE LOG TRACE

4:00:43.8125000 PM Verbose Pret a envoyer
4:00:43.8125000 PM Error Erreur d'encodage : : La
référence d'objet n'est pas définie à une instance
d'un objet.