Passing bytes from parent to child object question
In my parent object I have a 4 byte array.
And in my child object I also have the same.
Lets say in the parent object I want to pass all the contents of Buff1 to the child objects Buff2.
In the parent object method I do this...
PUB Some method
ChildObject.Transfer(Buff, Buff, Buff, Buff)
In the child object I have a method called Transfer and receive the 4 bytes to Buff2 in the child object.
PUB Transfer(data1, data2, data3, data4)
Buff2 := data1
Buff2 := data2
Buff2 := data3
Buff2 := data4
This works for me but was wondering if there is a simpler way to send the Buff1 as a whole to the child objects Buff2?