// EtherNet/IP (CIP) driver + point schemas. Companion to
// bacnet.proto and modbus.proto; same delivery pattern.
//
// Storage: edge.config KV under
//   driver.ethernet_ip.{device_id} → EthernetIpDriverConfig
// Cloud-to-edge delivery: ace.edge.cmd.config.update.

syntax = "proto3";

package aerodrome.v1;

// Address payload for one CIP-tag read. Scalar reads omit
// array_index; indexed-array reads set it to the zero-based
// element to fetch.
message EthernetIpPointAddress {
  // Logical tag name as the PLC exposes it.
  string tag_name = 1;

  // Element index for array-typed tags. Absent for scalars.
  optional uint32 array_index = 2;
}

// Per-PLC driver configuration. One row in edge.config under
// driver.ethernet_ip.{device_id}.
message EthernetIpDriverConfig {
  // ULID device handle.
  string device_id = 1;

  optional string label = 2;

  // PLC endpoint.
  string host = 3;

  // PLC backplane slot for ControlLogix / CompactLogix style
  // controllers. 0 is the standard default; legacy PLC-5 / SLC
  // setups occasionally use higher slot numbers.
  uint32 slot = 4;

  // Same NetworkAttachment handle scheme as ModbusDriverConfig.
  optional string network_attachment_id = 20;
}
