1 #ifndef UPTANE_IPUPTANESECONDARY_H_
2 #define UPTANE_IPUPTANESECONDARY_H_
4 #include "asn1/asn1_message.h"
5 #include "der_encoder.h"
6 #include "libaktualizr/secondaryinterface.h"
12 static SecondaryInterface::Ptr connectAndCreate(
const std::string& address,
unsigned short port);
13 static SecondaryInterface::Ptr create(
const std::string& address,
unsigned short port,
int con_fd);
15 static SecondaryInterface::Ptr connectAndCheck(
const std::string& address,
unsigned short port,
EcuSerial serial,
21 std::string Type()
const override {
return "IP"; }
22 EcuSerial getSerial()
const override {
return serial_; };
24 PublicKey getPublicKey()
const override {
return pub_key_; }
26 void init(std::shared_ptr<SecondaryProvider> secondary_provider_in)
override {
27 secondary_provider_ = std::move(secondary_provider_in);
30 int32_t getRootVersion(
bool )
const override {
return 0; }
35 Manifest getManifest()
const override;
36 bool ping()
const override;
41 const std::pair<std::string, uint16_t>& getAddr()
const {
return addr_; }
42 void getSecondaryVersion()
const;
50 AKMetaCollection_t& collection);
56 std::shared_ptr<SecondaryProvider> secondary_provider_;
57 std::pair<std::string, uint16_t> addr_;
61 mutable uint32_t protocol_version{0};
66 #endif // UPTANE_IPUPTANESECONDARY_H_