AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Object-Pascal / Delphi-Language Delphi Funktion Parameter zuweisen (Array of Byte)
Thema durchsuchen
Ansicht
Themen-Optionen

Funktion Parameter zuweisen (Array of Byte)

Ein Thema von Klaus01 · begonnen am 14. Sep 2006 · letzter Beitrag vom 18. Sep 2006
 
Klaus01

Registriert seit: 30. Nov 2005
Ort: München
5.778 Beiträge
 
Delphi 10.4 Sydney
 
#8

Re: Funktion Parameter zuweisen (Array of Byte)

  Alt 15. Sep 2006, 08:51
@Mavarik

nun, ich habe eine Datensatz der besteht aus 176 Byte
Diese lese ich ein ein Array ein:
Die Datensatzstruktur ist die folgende:

Delphi-Quellcode:
  
TKDUSet = record
    case boolean of
      true: (rawSet: Array [1..176] of Byte);
      false: ( //Gap: Array [1..60] of Byte;
               //FileManagementData: Array[1..12] of Char;
               FaultType: Byte;
               Direction: Byte;
               MessageNumber: Array [0..1] of Byte;
               TargetNode: Array [0..15] of Byte;
               Cause : Array [0..7] of Byte;
               Time : Array [0..7] of Byte;
               S_RNTI: Array [0..3] of Byte;
               RNCType: Byte;
               UEState: Byte;
               MainProcedure: Byte;
               Reserved : Byte;
               DRNCProcedure: Byte;
               DRNCState: Byte;
               MUEProcedure: Byte;
               MUEState : Byte;
               CRLProcedure: Byte;
               CRLState: Byte;
               TBProcedure: Byte;
               TBState: Byte;
               RACInstanceGroupID: Byte;
               RACInstanceProcessID: Byte;
               RACInstanceUEInstance: Array [0..1] of Byte;
               RRCEstablishmentCause: Byte;
               UEIDType: Byte;
               UEID: Array [0..7] of Byte;
               UEReleaseIndicator: Byte;
               HSDPAState: Byte;
               ServiceType: Array [0..1] of Byte;
               ULTFCSType: Byte;
               DLTFCSType: Byte;
               RLInformation: Array [0..3] of Array [0..7] of Byte;
               HWInformationDCCH: Array [0..23] of Byte;
               HWInformationServiceType: Array [0..1] of Array [0..23] of Byte;
              )
  end;
Wie man hier sieht ist RLInformation ein Array [0..7] of Byte.
RLInformation ist wieder ein eigener Datensatz:

Delphi-Quellcode:
  RLInformation = record
     case boolean of
       true : (rawSet :Array [0..7] of Byte);
       false: ( RNCID: Array [0..1] of Byte;
                CellID: Array [0..1] of Byte;
                BTSNumber: Array [0..1] of Byte;
                CPICHEc_N0: Byte;
                HSDPAIndicator: Byte;
              )
  end;
Ich arbeite hier mit Records weil ich dann einfacher auf die einzelnen Datenfelder zugreifen kann
ohne immer in dem Array hin und her zu springen.
Hierzu bieten sich, meiner Meinung nach, variante Records an.
Denn man kann hier relative einfach das Mapping von Datensatz auf Datenfelder vornehmen.

Ich bin damit auch relative unabhängig wenn sich die Datenstruktur innerhalb z.B.
RLInformation ändert. Ich brauche dann, entsprechend nur die Recordstruktur ändern.

Grüße
Klaus
Klaus
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:18 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz