#52 improve ciaaSerialDevice replace layer index with a pointer