Add marshal and unmarshal function of pointer detector type

Change-Id: I268b5d44e8fa5428f52b8e2ac7cdbb880d02e778