Commit faa0a07b authored by garciay's avatar garciay
Browse files

STF545: Start ATS development

parent f78937ed
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -721,6 +721,36 @@ module LibItsGeoNetworking_Templates {
                payload := valueof(char2oct("DEFAULT_PAYLOAD"))
            }
            
            /**
             * @desc    Send template for GeoNetworking Unicast Packet
             * @param   p_sourceLongPosVec          Long position vector of source
             * @param   p_destinationShortPosVec    Short position vector of destination
             * @param   p_seqNumber                 Sequence number of GeoUnicast packet
             * @param   p_hopLimit                  Maximum number of hops (Default: c_defaultHopLimit)
             * @param   p_trafficClass              Traffic Class 
             */
            template (value) GnNonSecuredPacket m_geoNwUnicastPacket_with_payload(
                                                                                  in template (value) LongPosVector p_sourceLongPosVec,
                                                                                  in template (value) ShortPosVector p_destinationShortPosVec,
                                                                                  in template (value) UInt16 p_seqNumber,
                                                                                  in template (value) UInt8 p_hopLimit := c_defaultHopLimit,
                                                                                  in template (value) TrafficClass p_trafficClass := m_trafficClass,
                                                                                  in template (value) GnRawPayload p_payload
            ) := {
                commonHeader := valueof(m_commonHeader(
                    PX_GN_UPPER_LAYER,
                    m_geoUnicastHeaderType,
                    p_trafficClass,
                    p_hopLimit
                )),
                extendedHeader := valueof(m_geoUnicastHeader(
                    p_sourceLongPosVec,
                    p_destinationShortPosVec,
                    p_seqNumber
                )),
                payload := valueof(p_payload)
            }
            
            /**
             * @desc    Receive template for GeoNetworking Unicast Packet
             * @param   p_destinationShortPosVec    Short position vector of destination
+34 −0
Original line number Diff line number Diff line
@@ -50,4 +50,38 @@ module LibItsPki_Templates {
        requestedSubjectAttributes := p_requestedSubjectAttributes
    } // End of template m_innerEcRequest
        
    template (omit) PublicKeys m_publicKeys(
                                            in template (value) PublicVerificationKey p_verificationKey,
                                            in template (omit) PublicEncryptionKey p_encryptionKey := omit
    ) := {
      verificationKey := p_verificationKey,
      encryptionKey   := p_encryptionKey
    } // End of template m_publicKeys
    
    template PublicKeys mw_publicKeys(
                                      template (present) PublicVerificationKey p_verificationKey := ?,
                                      template PublicEncryptionKey p_encryptionKey := *
    ) := {
      verificationKey := p_verificationKey,
      encryptionKey   := p_encryptionKey
    } // End of template mw_publicKeys
    
    template (omit) CertificateSubjectAttributes m_certificateSubjectAttributes(
                                                                                in template (value) SequenceOfPsidSsp p_appPermissions,
                                                                                in template (omit) ValidityPeriod p_validityPeriod := omit,
                                                                                in template (omit) GeographicRegion p_region := omit,
                                                                                in template (omit) SubjectAssurance p_assuranceLevel := omit
    ) := {
      id 			       := { none_ := NULL },
      validityPeriod       := p_validityPeriod,
      region               := p_region,
      assuranceLevel       := p_assuranceLevel,
      appPermissions       := p_appPermissions,
      certIssuePermissions := omit
    } // End of template m_certificateSubjectAttributes

    
    
    
    
} // End of module LibItsPki_Templates
 No newline at end of file